Framing Method for Multi-Channel Video Recording, Graphical User Interface, and Electronic Device

ABSTRACT

In a multi-channel video mode, an electronic device may separately display a plurality of images from different cameras in a plurality of areas of a viewfinder frame. An image from one camera is displayed in one area, and a user operation such as a leftward sliding operation or a rightward sliding operation of a user in an area may be detected, to change framing presented by a corresponding camera in the area, without changing framing of another camera in a corresponding area. In this way, during multi-channel video recording, the user can separately adjust framing presented by each working camera in a preview frame, so that framing of each working camera in the preview frame does not affect each other, to avoid a problem that a change of framing of a working camera in the preview frame causes a change of framing of another working camera in the preview frame.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No.PCT/CN2021/089075, filed on Apr. 22, 2021, which claims priority toChinese Patent Application No. 202010324919.1, filed on Apr. 22, 2020.Both of the aforementioned applications are hereby incorporated byreference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of electronic technologies,and in particular, to a framing method applied to multi-channel videorecording, a graphical user interface, and an electronic device.

BACKGROUND

Currently, a portable electronic device (such as a mobile phone or atablet computer) is generally configured with a plurality of cameras,such as a front-facing camera, a wide-angle camera, and a long-focuscamera. To bring further image shooting creation experience, anincreasing quantity of electronic devices may support simultaneous imageshooting of a plurality of cameras.

SUMMARY

An objective of this application is to provide a framing method formulti-channel video recording, a graphical user interface (graphicaluser interface, GUI), and an electronic device, so that a user canseparately adjust framing of each working camera in a preview frameduring multi-channel shooting, and framing of each working camera in thepreview frame does not affect each other, to avoid a problem that achange of framing of a working camera in the preview frame causes achange of framing of another working camera in the preview frame.

The foregoing objective and other objectives are achieved by usingfeatures in the independent claims. Further implementations are embodiedin the dependent claims, the specification, and the accompanyingdrawings.

According to a first aspect, a framing method for multi-channel videorecording is provided. The method is applied to an electronic devicehaving a display and M cameras, where M≥2, and M is a positive integer.The method includes: The electronic device enables N cameras, where N≤M,and N is a positive integer. The electronic device captures images byusing the N cameras. The electronic device displays a preview interfaceand a part or all of an image captured by each of the N cameras. Thepreview interface includes N areas, and the part or all of the imagecaptured by each of the N cameras is displayed in one of the N areas.The electronic device detects a first user operation in a first area.The first area is one of the N areas, a first preview image is displayedin the first area, and the first preview image is obtained by croppingan entire image captured by the first camera. The electronic devicedisplays a second preview image in the first area. The second previewimage is also obtained by cropping the entire image captured by thefirst camera, and in the entire image captured by the first camera, alocation of the second preview image is different from a location of thefirst preview image. The electronic device detects a second useroperation. The electronic device starts to record a video, and displaysan image shooting interface. The image shooting interface includes the Nareas.

According to the method provided in the first aspect, in a multi-channelvideo recording preview process, a user can adjust framing of eachworking camera in a preview frame by performing a user operation, sothat framing of each working camera in the preview frame does not affecteach other.

With reference to the first aspect, in a possible implementation, thefirst camera may be a rear-facing camera, or may be a front-facingcamera. Specifically, a central location of the first preview image maycoincide with a central location of the entire image captured by thefirst camera. In this case, the first preview image is obtained in acenter cropping manner.

With reference to the first aspect, in a possible implementation, at aix rate of the first camera, a size of the first preview image may bethe same as a size of the first area.

With reference to the first aspect, in a possible implementation, thefirst user operation includes a sliding operation, for example, aleftward sliding operation or a rightward sliding operation. In theentire image captured by the first camera, a direction in which acentral location of the first preview image points to a central locationof the second preview image is opposite to a sliding direction of thesliding operation. In this way, the user may change, by using thesliding operation, a framing range presented by the first camera in thefirst area.

Specifically, if the first user operation is a leftward slidingoperation, the second preview image is closer to a right boundary of theentire image captured by the first camera than the first preview image.

Specifically, if the first user operation is a rightward slidingoperation, the second preview image is closer to a left boundary of theentire image captured by the first camera than the first preview image.

With reference to the first aspect, in a possible implementation, thecentral location of the first preview image coincides with the centrallocation of the entire image captured by the first camera. In otherwords, the electronic device may crop, in the center cropping manner,the entire image captured by the first camera, to obtain the firstpreview image.

With reference to the first aspect, in a possible implementation, thesecond preview image may be the same size as the first preview image. Inother words, before and after the user adjusts the framing of the cameraby using the sliding operation, the electronic device does not change asize of a cropping area in the entire image captured by the firstcamera.

With reference to the first aspect, in a possible implementation, theelectronic device further detects a third user operation beforedetecting the first user operation. The electronic device zooms in thefirst preview image, and displays a zoomed-in first preview image in thefirst area. Herein, the first user operation may be a sliding operation,and the third user operation may be a two-finger zoom-in operation. Inthis way, the electronic device may separately adjust, in a zoomscenario, a framing range presented by a camera on the previewinterface, without affecting a framing range presented by another cameraon the preview interface.

With reference to the first aspect, in a possible implementation, thesecond user operation is a user operation indicating to start to recorda video, for example, a tap operation on an image shooting control.

With reference to the first aspect, in a possible implementation, theelectronic device may further detect a fourth user operation in thefirst area on the image shooting interface. The electronic devicedisplays a third preview image of the first camera in the first area onthe image shooting interface. The third preview image is obtained bycropping the entire image captured by the first camera, and in theentire image captured by the first camera, a location of the thirdpreview image is different from the location of the second previewimage.

In this way, after adjusting framing of a camera on the previewinterface, the user may further adjust, by using a user operation, aframing range presented by the camera on the image shooting interface.

Specifically, the fourth user operation may be a sliding operation.

With reference to the first aspect, in a possible implementation, whenthe electronic device detects the first user operation, if a posture ofthe electronic device does not change, the electronic device displaysthe second preview image of the first camera in the first area. When theelectronic device detects the first user operation, if the posture ofthe electronic device changes, the electronic device displays a fourthpreview image of the first camera in the first area. The fourth previewimage is obtained by cropping the entire image captured by the firstcamera, and a central location of the fourth preview image coincideswith a central location of the entire framed image of the first camera.

In other words, the electronic device adjusts the framing range of thecamera on the preview interface based on the first user operation onlywhen the posture of the electronic device does not change. When thefirst user operation is detected, if the posture of the electronicdevice changes, the electronic device may not adjust the framing rangeof the camera on the preview interface based on the first user operationdetected at this time, so that the user changes optical framing byadjusting the posture of the electronic device.

With reference to the first aspect, in a possible implementation, theelectronic device may detect that the entire image captured by the firstcamera includes an image of a first face. The electronic device displaysa fifth preview image in the first area. The fifth preview image isobtained by cropping the entire image captured by the first camera, andthe fifth preview image includes the image of the first face. Theelectronic device detects that a location of the image of the first facein the entire image captured by the first camera changes. The electronicdevice displays a sixth preview image in the first area. The sixthpreview image is obtained by cropping the entire image captured by thefirst camera, and the sixth preview image includes the image of thefirst face. In other words, the framing method for multi-channel videorecording provided in this embodiment of this application may furtherprovide a face tracking function, so that a preview image including aface is always displayed in an area on the preview interface.

In some embodiments, a location of the image of the first face in thesixth preview image is the same as a location of the image of the firstface in the fifth preview image.

In some embodiments, the image of the first face is in a central area ofthe fifth preview image.

With reference to the first aspect, in a possible implementation, theelectronic device may further detect that the entire image captured bythe first camera includes an image of a first face; and enables a secondcamera. A framing range of the second camera is greater than a framingrange of the first camera, and the first face is within the framingrange of the second camera. The electronic device displays a seventhpreview image in the first area. The seventh preview image is obtainedby cropping an entire image captured by the second camera, and theseventh preview image includes the image of the first face. Theelectronic device detects that a location of the image of the first facein the entire image captured by the second camera changes. Theelectronic device displays an eighth preview image in the first area.The eighth preview image is obtained by cropping the entire imagecaptured by the second camera, and the eighth preview image includes theimage of the first face. In this way, a framing range corresponding to apreview area can be expanded during face tracking.

In some embodiments, a location of the image of the first face in theseventh preview image is the same as a location of the image of thefirst face in the eighth preview image.

In some embodiments, the image of the first face is in a central area ofthe seventh preview image.

With reference to the first aspect, in a possible implementation, thefirst camera is a front-facing camera or a rear-facing camera. In otherwords, functions such as the face tracking function and adjusting aframing range of a camera by sliding provided in this embodiment of thisapplication is applicable to a front-facing image shooting scenario, oris applicable to a rear-facing image shooting scenario.

With reference to the first aspect, in a possible implementation, theelectronic device may further detect a fifth user operation. Theelectronic device stops recording a video, and generates a video file.The electronic device detects a sixth user operation for the video file.The electronic device displays a playback interface. The playbackinterface includes the N areas. In this way, after adjusting a previewimage of each area based on a requirement of the user, the user can savea desired preview image, so that the user can obtain more flexible andconvenient video recording experience.

The fifth user operation is a user operation indicating to stoprecording a video, for example, may be a tap operation performed on animage shooting control.

According to a second aspect, an embodiment of this application providesa framing method for multi-channel video recording. The method isapplied to an electronic device having a display and M cameras, whereM≥2, and M is a positive integer. The method includes: The electronicdevice enables N cameras, where N≤M, and N is a positive integer. Theelectronic device captures images by using the N cameras. The electronicdevice displays a preview interface and a part or all of an imagecaptured by each of the N cameras. The preview interface includes Nareas, and the part or all of the image captured by each of the Ncameras is displayed in one of the N areas. The electronic devicedetects a seventh user operation in a first area. The electronic devicedetects that a posture of the electronic device changes. The electronicdevice displays a ninth preview image in the first area. A framing rangeof the ninth preview image is the same as a framing range of a tenthpreview image, the tenth preview image is an image displayed in thefirst area before the posture of the electronic device changes, theninth preview image is obtained by cropping an entire image captured bythe first camera after the posture of the electronic device changes, andthe tenth preview image is obtained by cropping the entire imagecaptured by the first camera before the posture of the electronic devicechanges. The electronic device detects an eighth user operation. Theelectronic device starts to record a video, and displays an imageshooting interface. The image shooting interface includes the N areas.

The seventh user operation may be a user operation of selecting thefirst area, for example, a double-tap operation or a touch-and-holdoperation performed on the first area.

According to the method provided in the second aspect, when the postureof the electronic device changes, a framing range of a selected previewarea is not affected.

According to a third aspect, an embodiment of this application providesa framing method for multi-channel photographing. The method is appliedto an electronic device having a display and M cameras, where M≥2, and Mis a positive integer. The method includes: The electronic deviceenables N cameras, where N≤M, and N is a positive integer. Theelectronic device captures images by using the N cameras. The electronicdevice displays a preview interface and a part or all of an imagecaptured by each of the N cameras. The preview interface includes Nareas, and the part or all of the image captured by each of the Ncameras is displayed in one of the N areas. The electronic devicedetects a first user operation in a first area. The first area is one ofthe N areas, a first preview image is displayed in the first area, andthe first preview image is obtained by cropping an entire image capturedby the first camera. The electronic device displays a second previewimage in the first area. The second preview image is also obtained bycropping the entire image captured by the first camera, and in theentire image captured by the first camera, a location of the secondpreview image is different from a location of the first preview image.

According to the method provided in the second aspect, in amulti-channel photographing preview process, a user can adjust framingof each working camera in a preview frame by performing a useroperation, so that framing of each working camera in the preview framedoes not affect each other.

According to a third aspect, an electronic device is further provided.The electronic device may include M cameras, a display, a touch sensor,a wireless communication module, a memory, and one or more processors.The one or more processors are configured to execute one or morecomputer programs stored in the memory. M≥2, and M is a positiveinteger.

N cameras are configured to capture images.

The display may be configured to display a preview interface and a partor all of an image captured by each of the N cameras. The previewinterface includes N areas, and the part or all of the image captured byeach of the N cameras is displayed in one of the N areas.

The touch sensor may be configured to detect a first user operation in afirst area. The first area is one of the N areas, a first preview imageis displayed in the first area, and the first preview image is obtainedby cropping an entire image captured by the first camera.

The display may be configured to display a second preview image in thefirst area in response to the first user operation. The second previewimage is also obtained by cropping the entire image captured by thefirst camera, and in the entire image captured by the first camera, alocation of the second preview image is different from a location of thefirst preview image.

The touch sensor may be further configured to detect a second useroperation.

The N cameras may be configured to start to record a video in responseto the second user operation. The display may be configured to displayan image shooting interface in response to the second user operation.The image shooting interface includes the N areas.

For a specific implementation of each component included in theelectronic device in the third aspect, refer to the method described inthe first aspect. Details are not described herein again.

According to a fourth aspect, an electronic device is further provided.The electronic device may include an apparatus, and the apparatus mayimplement any possible implementation of the first aspect or anypossible implementation of the second aspect.

According to a fifth aspect, a video recording apparatus is furtherprovided. The apparatus has a function of implementing behavior of theelectronic device in the foregoing method implementation. The functionmay be implemented by using hardware, or may be implemented by usinghardware executing corresponding software. The hardware or softwareincludes one or more modules corresponding to the foregoing functions.

According to a sixth aspect, a computer device is provided, including amemory, a processor, and a computer program that is stored in the memoryand that can be run on the processor. When the processor executes thecomputer program, the computer device is enabled to implement anypossible implementation of the first aspect or any possibleimplementation of the second aspect.

According to a seventh aspect, a computer program product includinginstructions is provided. When the computer program product runs on anelectronic device, the electronic device is enabled to perform anypossible implementation of the first aspect or any possibleimplementation of the second aspect.

According to an eighth aspect, a computer-readable storage mediumincluding instructions is provided. When the instructions are run on anelectronic device, the electronic device is enabled to perform anypossible implementation of the first aspect or any possibleimplementation of the second aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in embodiments of this applicationmore clearly, the following describes the accompanying drawings used inembodiments of this application.

FIG. 1 is a schematic diagram of a structure of an electronic deviceaccording to an embodiment;

FIG. 2A is a schematic diagram of a user interface that is on anelectronic device and that is used for an application menu according toan embodiment;

FIG. 2B is a schematic diagram of a rear-facing camera on an electronicdevice according to an embodiment;

FIG. 3A to FIG. 3D are schematic diagrams of a dual-channel videorecording scenario according to this application;

FIG. 4A is a schematic diagram of a working principle of dual-channelvideo recording;

FIG. 4B is a schematic diagram of image cropping of existingdual-channel video recording;

FIG. 5 is a schematic diagram of a multi-channel video recordingscenario;

FIG. 6A, FIG. 6B, FIG. 6D, and FIG. 6E are schematic diagrams of UIs inwhich a preview image displayed in each area is adjusted in amulti-channel video recording preview process according to anembodiment;

FIG. 6C and FIG. 6F are schematic diagrams of cropping an image when apreview image displayed in each area is adjusted in a multi-channelvideo recording preview process according to an embodiment;

FIG. 7A, FIG. 7B, FIG. 7D, and FIG. 7E are schematic diagrams of UIs inwhich a preview image displayed in each area is adjusted in amulti-channel video recording preview process according to anotherembodiment;

FIG. 7C and FIG. 7F are schematic diagrams of cropping an image when apreview image displayed in each area is adjusted in a multi-channelvideo recording preview process according to another embodiment;

FIG. 8A and FIG. 8B are schematic diagrams of cropping an image when apreview image displayed in each area is adjusted in a multi-channelvideo recording preview process according to another embodiment;

FIG. 9A to FIG. 9C are schematic diagrams of UIs in which a previewimage displayed in each area is adjusted in a multi-channel videorecording preview process according to another embodiment;

FIG. 9D and FIG. 9E are schematic diagrams of cropping an image when apreview image displayed in each area is adjusted in a multi-channelvideo recording preview process according to another embodiment;

FIG. 10A-1 to FIG. 10B-2 are schematic diagrams of UIs that prompt auser of a location of a preview image displayed in each area in amulti-channel video recording preview process according to anembodiment;

FIG. 11A to FIG. 11F are schematic diagrams of UIs in which a previewimage displayed in each area is adjusted in a multi-channel videorecording process according to an embodiment;

FIG. 12A and FIG. 12B are schematic diagrams of UIs in which a previewimage displayed in each area is adjusted by moving an electronic devicein a multi-channel video recording preview process according to anembodiment;

FIG. 13A and FIG. 13B are schematic diagrams of UIs in which a previewimage displayed in each area is adjusted in a multi-channelphotographing preview process according to an embodiment;

FIG. 14 is a schematic diagram of collaboration between some softwareand hardware of an electronic device according to an embodiment; and

FIG. 15 is a schematic flowchart of a framing method for multi-channelvideo recording according to an embodiment.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

Terms used in the following embodiments of this application are merelyintended to describe particular embodiments, but are not intended tolimit this application. Terms “one”, “a”, “the”, “the foregoing”,“this”, and “the one” of singular forms used in this specification andthe appended claims of this application are also intended to includeplural forms, unless otherwise specified in the context clearly. Itshould be further understood that, a term “and/or” used in thisapplication indicates and includes any one or all of possiblecombinations of one or more listed items.

This application provides a framing method for multi-channel videorecording, which may be applied to an electronic device including aplurality of cameras. The electronic device may simultaneously use theplurality of cameras to perform photographing or video recording, toobtain a plurality of channels of images and more abundant pictureinformation. In addition, the electronic device may further support auser in separately adjusting framing of each working camera in a previewarea corresponding to the working camera during multi-channelphotographing or video recording, so that framing of each working camerain the preview area corresponding to the operating camera does notaffect each other, to avoid a problem that a change of framing of aworking camera in a corresponding preview area causes a change offraming of another working camera in a corresponding preview area.

A framing range (also referred to as a field of view, FOV) of a camerais determined by design of an optical system of the camera. For example,a wide-angle camera has a large framing range. The user may adjustframing of the camera by moving the electronic device. In embodiments ofthis application, framing of a camera in a corresponding preview area ofthe camera may be adjusted by using a user operation (for example, aleftward or rightward sliding operation) performed on the preview area.Framing of a camera in a corresponding preview area of the camera iscontent displayed in the corresponding preview area.

A camera is used to display a part or all of an image from the camera ina corresponding preview area. A preview image displayed by a camera in acorresponding preview area is specifically an image in a cropping areain an image captured by the camera, that is, the preview image displayedin the preview area is obtained by cropping the image captured by thecamera.

In embodiments of this application, multi-channel image shooting mayinclude multi-channel video recording and multi-channel photographing.The electronic device may provide two multi-channel image shootingmodes: a multi-channel video mode and a multi-channel photo mode.

The multi-channel video mode may mean that the plurality of cameras inthe electronic device, for example, a front-facing camera and arear-facing camera, may simultaneously record multi-channel videos. Inthe multi-channel video mode, in a video recording preview or videorecording process or in a recorded video playing process, a display maysimultaneously display, on a same interface, a plurality of images fromthe plurality of cameras. The plurality of images may be stitched anddisplayed on a same interface, or displayed in a picture-in-picturemanner. The display manner is described in detail in subsequentembodiments. In addition, in the multi-channel video mode, the pluralityof images may be saved as a plurality of videos in Gallery (which mayalso be referred to as Album), or a synthesized video formed bystitching the plurality of videos.

The “video recording” may also be referred to as “recording a video”. Inthe following embodiments of this application, “video recording” and“recording a video” have a same meaning.

The multi-channel photo mode may mean that the plurality of cameras inthe electronic device, for example, a front-facing camera and arear-facing camera, may simultaneously shoot a plurality of pictures. Inthe multi-channel photo mode, during photographing preview, the displaymay simultaneously display, in a viewfinder frame (which may also bereferred to as a preview frame), a plurality of frames of images fromthe plurality of cameras. The plurality of frames of images may bestitched and displayed in the viewfinder frame, or displayed in apicture-in-picture manner. In addition, in the multi-channel photo mode,the plurality of frames of images may be saved as a plurality ofpictures in Gallery (which may also be referred to as Album), or acomposite image formed by stitching the plurality of frames of images.

In embodiments of this application, an image displayed in the previewframe from a camera is obtained by cropping an image captured by thecamera. For a cropping manner, refer to descriptions in subsequentembodiments.

The “multi-channel photo mode” and the “multi-channel video mode” aremerely some names used in embodiments of this application, meaningsrepresented by the names have been recorded in embodiments of thisapplication, and the names should not constitute any limitation onembodiments.

First, an electronic device provided in embodiments of this applicationis described.

The electronic device may be a mobile phone, a tablet computer, awearable device, a vehicle-mounted device, an augmented reality(augmented reality, AR)/virtual reality (virtual reality, VR) device, anotebook computer, an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), a netbook, a personal digital assistant(personal digital assistant, PDA), or a dedicated camera (for example, asingle-lens reflex camera or a card camera). A specific type of theelectronic device is not limited in this application.

FIG. 1 shows an example of a structure of the electronic device. Asshown in FIG. 1 , the electronic device 100 may have a plurality ofcameras 193, for example, a front-facing camera, a wide-angle camera, anultra-wide-angle camera, and a long-focus camera. In addition, theelectronic device 100 may further include a processor 110, an externalmemory interface 120, an internal memory 121, a universal serial bus(universal serial bus, USB) interface 130, a charging management module140, a power management module 141, a battery 142, an antenna 1, anantenna 2, a mobile communication module 150, a wireless communicationmodule 160, an audio module 170, a speaker 170A, a receiver 170B, amicrophone 170C, a headset jack 170D, a sensor module 180, a button 190,a motor 191, an indicator 192, a display 194, a subscriberidentification module (subscriber identification module, SIM) cardinterface 195, and the like.

The sensor module 180 may include a pressure sensor 180A, a gyroscopesensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D,an acceleration sensor 180E, a distance sensor 180F, an opticalproximity sensor 180G, a fingerprint sensor 180H, a temperature sensor180J, a touch sensor 180K, an ambient light sensor 180L, a boneconduction sensor 180M, and the like.

It may be understood that the structure shown in this embodiment of thisapplication constitutes no specific limitation on the electronic device100. In some other embodiments of this application, the electronicdevice 100 may include more or fewer components than those shown in thefigure, or some components may be combined, or some components may besplit, or different component arrangements may be used. The componentsshown in the figure may be implemented by hardware, software, or acombination of software and hardware.

The processor 110 may include one or more processing units. For example,the processor 110 may include an application processor (applicationprocessor, AP), a modem processor, a graphics processing unit (graphicsprocessing unit, GPU), an image signal processor (image signalprocessor, ISP), a controller, a memory, a video codec, a digital signalprocessor (digital signal processor, DSP), a baseband processor, aneural-network processing unit (neural-network processing unit, NPU),and/or the like. Different processing units may be independentcomponents, or may be integrated into one or more processors.

In some embodiments, the processor 110 such as the controller or the GPUmay be configured to: in a multi-channel image shooting scenario,synthesize, in a manner of stitching, partial superposition, or thelike, a plurality of frames of images simultaneously captured by aplurality of cameras 193 into a preview image displayed in a viewfinderframe, so that the electronic device 100 can simultaneously display theimages captured by the plurality of cameras 193.

In some other embodiments, the processor 110 such as the controller orthe GPU may be further configured to: in a multi-channel image shootingscenario, perform image stabilization processing on an image captured byeach camera 193, and then synthesize images that are obtained after theimage stabilization processing and that correspond to the plurality ofcameras 193.

The controller may be a nerve center and a command center of theelectronic device 100. The controller may generate an operation controlsignal based on an instruction operation code and a time sequencesignal, to complete control of instruction reading and instructionexecution.

A memory may be further disposed in the processor 110, and is configuredto store instructions and data. In some embodiments, the memory in theprocessor 110 is a cache. The memory may store instructions or data justused or cyclically used by the processor 110. If the processor 110 needsto use the instructions or the data again, the processor 110 maydirectly invoke the instructions or the data from the memory. Thisavoids repeated access, reduces waiting time of the processor 110, andimproves system efficiency.

In some embodiments, the processor 110 may include one or moreinterfaces. The interface may include an inter-integrated circuit(inter-integrated circuit, I2C) interface, an inter-integrated circuitsound (inter-integrated circuit sound, I2S) interface, a pulse codemodulation (pulse code modulation, PCM) interface, a universalasynchronous receiver/transmitter (universal asynchronousreceiver/transmitter, UART) interface, a mobile industry processorinterface (mobile industry processor interface, MIPI), a general-purposeinput/output (general-purpose input/output, GPIO) interface, asubscriber identity module (subscriber identity module, SIM) interface,a universal serial bus (universal serial bus, USB) interface, and/or thelike. It may be understood that an interface connection relationshipbetween the modules illustrated in this embodiment of this applicationis merely an example for description, and constitutes no limitation onthe structure of the electronic device 100. In some other embodiments ofthis application, the electronic device 100 may alternatively use aninterface connection manner different from that in the foregoingembodiment, or use a combination of a plurality of interface connectionmanners.

The charging management module 140 is configured to receive a charginginput from the charger. The charger may be a wireless charger or a wiredcharger. In some embodiments of wired charging, the charging managementmodule 140 may receive a charging input of a wired charger through theUSB interface 130. In some embodiments of wireless charging, thecharging management module 140 may receive a wireless charging inputthrough a wireless charging coil of the electronic device 100. Thecharging management module 140 supplies power to the electronic devicethrough the power management module 141 while charging the battery 142.

The power management module 141 is configured to connect to the battery142, the charging management module 140, and the processor 110. Thepower management module 141 receives an input of the battery 142 and/orthe charging management module 140, to supply power to the processor110, the internal memory 121, an external memory, the display 194, thecamera 193, the wireless communication module 160, and the like. Thepower management module 141 may be further configured to monitorparameters such as a battery capacity, a battery cycle count, and abattery health status (electric leakage or impedance).

In some other embodiments, the power management module 141 mayalternatively be disposed in the processor 110. In some otherembodiments, the power management module 141 and the charging managementmodule 140 may alternatively be disposed in a same device.

A wireless communication function of the electronic device 100 may beimplemented through the antenna 1, the antenna 2, the mobilecommunication module 150, the wireless communication module 160, themodem processor, the baseband processor, and the like.

The antenna 1 and the antenna 2 are configured to transmit and receivean electromagnetic wave signal. Each antenna in the electronic device100 may be configured to cover one or more communication frequencybands. Different antennas may be further multiplexed, to improve antennautilization. For example, the antenna 1 may be multiplexed as adiversity antenna of a wireless local area network. In some otherembodiments, the antenna may be used in combination with a tuningswitch.

The mobile communication module 150 can provide a solution, applied tothe electronic device 100, to wireless communication including 2G, 3G,4G, 5G, and the like. The mobile communication module 150 may include atleast one filter, a switch, a power amplifier, a low noise amplifier(low noise amplifier, LNA), and the like. The mobile communicationmodule 150 may receive an electromagnetic wave through the antenna 1,perform processing such as filtering or amplification on the receivedelectromagnetic wave, and transmit the electromagnetic wave to the modemprocessor for demodulation. The mobile communication module 150 mayfurther amplify a signal modulated by the modem processor, and convertthe signal into an electromagnetic wave for radiation through theantenna 1.

The wireless communication module 160 may provide a wirelesscommunication solution that is applied to the electronic device 100 andthat includes a wireless local area network (wireless local areanetwork, WLAN) (for example, a wireless fidelity (wireless fidelity,Wi-Fi) network), Bluetooth (Bluetooth, BT), a global navigationsatellite system (global navigation satellite system, GNSS), frequencymodulation (frequency modulation, FM), a near field communication (nearfield communication, NFC) technology, an infrared (infrared, IR)technology, or the like. The wireless communication module 160 may beone or more components integrating at least one communication processormodule. The wireless communication module 160 receives anelectromagnetic wave through the antenna 2, performs frequencymodulation and filtering processing on an electromagnetic wave signal,and sends a processed signal to the processor 110. The wirelesscommunication module 160 may further receive a to-be-sent signal fromthe processor 110, perform frequency modulation and amplification on thesignal, and convert the signal into an electromagnetic wave forradiation through the antenna 2.

In some embodiments, in the electronic device 100, the antenna 1 and themobile communication module 150 are coupled, and the antenna 2 and thewireless communication module 160 are coupled, so that the electronicdevice 100 can communicate with a network and another device by using awireless communication technology. The wireless communication technologymay include a global system for mobile communications (global system formobile communications, GSM), a general packet radio service (generalpacket radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code division multiple access(wideband code division multiple access, WCDMA), time-division codedivision multiple access (time-division code division multiple access,TD-SCDMA), long term evolution (long term evolution, LTE), BT, a GNSS, aWLAN, NFC, FM, an IR technology, and/or the like. The GNSS may include aglobal positioning system (global positioning system, GPS), a globalnavigation satellite system (global navigation satellite system,GLONASS), a BeiDou navigation satellite system (BeiDou navigationsatellite system, BDS), a quasi-zenith satellite system (quasi-zenithsatellite system, QZSS), and/or a satellite based augmentation system(satellite based augmentation system, SBAS).

The external memory interface 120 may be configured to connect to anexternal storage card, for example, a micro SD card, to extend a storagecapability of the electronic device 100. The external storage cardcommunicates with the processor 110 through the external memoryinterface 120, to implement a data storage function. For example, filessuch as music and videos are stored in the external storage card.

The internal memory 121 may be configured to store computer-executableprogram code, where the executable program code includes instructions.The processor 110 runs the instructions stored in the internal memory121, to perform various function applications of the electronic device100 and data processing. The internal memory 121 may include a programstorage area and a data storage area. The program storage area may storean operating system, an application required by at least one function(for example, a voice playing function or an image playing function),and the like. The data storage area may store data (such as audio dataand an address book) created during use of the electronic device 100,and the like. In addition, the internal memory 121 may include ahigh-speed random access memory, or may include a nonvolatile memory,for example, at least one magnetic disk storage device, a flash memory,or a universal flash storage (universal flash storage, UFS).

The electronic device 100 may implement an audio function, for example,music playing and recording, through the audio module 170, the speaker170A, the receiver 170B, the microphone 170C, the headset jack 170D, theapplication processor, and the like. The audio module 170 is configuredto convert digital audio information into an analog audio signal foroutput, and is also configured to convert an analog audio input into adigital audio signal. The audio module 170 may be further configured tocode and decode an audio signal. In some embodiments, the audio module170 may be disposed in the processor 110, or some functional modules inthe audio module 170 are disposed in the processor 110.

The pressure sensor 180A is configured to sense a pressure signal, andcan convert the pressure signal into an electrical signal. In someembodiments, the pressure sensor 180A may be disposed on the display194. There are a plurality of types of pressure sensors 180A, such as aresistive pressure sensor, an inductive pressure sensor, and acapacitive pressure sensor. The capacitive pressure sensor may includeat least two parallel plates made of conductive materials. When a forceis applied to the pressure sensor 180A, capacitance between electrodeschanges. The electronic device 100 determines pressure intensity basedon the change in the capacitance. When a touch operation is performed onthe display 194, the electronic device 100 detects intensity of thetouch operation by using the pressure sensor 180A. The electronic device100 may also calculate a touch location based on a detection signal ofthe pressure sensor 180A.

The gyroscope sensor 180B may be configured to determine a motionposture of the electronic device 100. In some embodiments, an angularvelocity of the electronic device 100 around three axes (namely, axes x,y, and z) may be determined by using the gyroscope sensor 180B. Thegyroscope sensor 180B may be configured to implement image stabilizationduring image shooting. For example, when the shutter is pressed, thegyroscope sensor 180B detects an angle at which the electronic device100 jitters, calculates, based on the angle, a distance for which a lensmodule needs to compensate, and allows the lens to cancel the jitter ofthe electronic device 100 through reverse motion, to implement imagestabilization. The gyroscope sensor 180B may also be used in anavigation scenario and a somatic game scenario.

The barometric pressure sensor 180C is configured to measure barometricpressure. In some embodiments, the electronic device 100 calculates analtitude through the barometric pressure measured by the barometricpressure sensor 180C, to assist in positioning and navigation.

The magnetic sensor 180D includes a Hall sensor. The electronic device100 may detect opening and closing of a flip cover by using the magneticsensor 180D. In some embodiments, when the electronic device 100 is aclamshell phone, the electronic device 100 may detect opening andclosing of a flip cover based on the magnetic sensor 180D. Further, afeature such as automatic unlocking of the flip cover is set based on adetected opening or closing state of the leather case or a detectedopening or closing state of the flip cover.

The acceleration sensor 180E may detect accelerations in variousdirections (usually on three axes) of the electronic device 100. Whenthe electronic device 100 is still, a magnitude and a direction ofgravity may be detected. The acceleration sensor 180E may be furtherconfigured to identify a posture of the electronic device, and is usedin an application such as switching between a landscape mode and aportrait mode or a pedometer.

The distance sensor 180F is configured to measure a distance. Theelectronic device 100 may measure the distance in an infrared manner ora laser manner. In some embodiments, in an image shooting scenario, theelectronic device 100 may measure a distance through the distance sensor180F to implement quick focusing.

The optical proximity sensor 180G may include, for example, a lightemitting diode (LED) and an optical detector, for example, a photodiode.The light emitting diode may be an infrared light emitting diode. Theelectronic device 100 emits infrared light by using the light emittingdiode. The electronic device 100 detects infrared reflected light from anearby object through the photodiode. When sufficient reflected light isdetected, it may be determined that there is an object near theelectronic device 100. When insufficient reflected light is detected,the electronic device 100 may determine that there is no object near theelectronic device 100. The electronic device 100 may detect, by usingthe optical proximity sensor 180G, that a user holds the electronicdevice 100 close to an ear for a call, to automatically turn off ascreen for power saving. The optical proximity sensor 180G may also beused in a smart cover mode or a pocket mode to automatically performscreen unlocking or locking.

The ambient light sensor 180L is configured to sense ambient lightbrightness. The electronic device 100 may adaptively adjust brightnessof the display 194 based on the sensed ambient light brightness. Theambient light sensor 180L may also be configured to automatically adjustwhite balance during photographing. The ambient light sensor 180L mayalso cooperate with the optical proximity sensor 180G to detect whetherthe electronic device 100 is in a pocket, to avoid an accidental touch.

The fingerprint sensor 180H is configured to collect a fingerprint. Theelectronic device 100 may use a feature of the collected fingerprint toimplement fingerprint-based unlocking, application lock access,fingerprint-based photographing, fingerprint-based call answering, andthe like.

The temperature sensor 180J is configured to detect a temperature. Insome embodiments, the electronic device 100 executes a temperatureprocessing policy through the temperature detected by the temperaturesensor 18W. For example, when the temperature reported by thetemperature sensor 180J exceeds a threshold, the electronic device 100lowers performance of a processor nearby the temperature sensor 180J, toreduce power consumption for thermal protection. In some otherembodiments, when the temperature is less than another threshold, theelectronic device 100 heats the battery 142 to prevent the electronicdevice 100 from being shut down abnormally due to a low temperature. Insome other embodiments, when the temperature is lower than still anotherthreshold, the electronic device 100 boosts an output voltage of thebattery 142 to avoid abnormal shutdown caused by a low temperature.

The touch sensor 180K is also referred to as a “touch panel”. The touchsensor 180K may be disposed in the display 194, and the touch sensor180K and the display 194 constitute a touchscreen, which is alsoreferred to as a “touch screen”. The touch sensor 180K is configured todetect a touch operation performed on or near the touch sensor. Thetouch sensor may transfer the detected touch operation to theapplication processor to determine a type of the touch event. A visualoutput related to the touch operation may be provided through thedisplay 194. In some other embodiments, the touch sensor 180K may alsobe disposed on a surface of the electronic device 100 at a locationdifferent from that of the display 194.

The bone conduction sensor 180M may obtain a vibration signal. In someembodiments, the bone conduction sensor 180M may obtain a vibrationsignal of a vibration bone of a human vocal-cord part. The boneconduction sensor 180M may also be in contact with a body pulse toreceive a blood pressure beating signal. In some embodiments, the boneconduction sensor 180M may also be disposed in the headset, to obtain abone conduction headset. The audio module 170 may obtain a voice signalthrough parsing based on the vibration signal that is of the vibrationbone of the vocal-cord part and that is obtained by the bone conductionsensor 180M, to implement a voice function. The application processormay parse heart rate information based on the blood pressure beatingsignal obtained by the bone conduction sensor 180M, to implement a heartrate detection function.

The button 190 includes a power button, a volume button, and the like.The button 190 may be a mechanical button, or may be a touch button. Theelectronic device 100 may receive a button input, and generate a buttonsignal input related to a user setting and function control of theelectronic device 100.

The motor 191 may generate a vibration prompt. The motor 191 may beconfigured to provide an incoming call vibration prompt and a touchvibration feedback. For example, touch operations performed on differentapplications (for example, photographing and audio playback) maycorrespond to different vibration feedback effects. The motor 191 mayalso correspond to different vibration feedback effects for touchoperations performed on different areas of the display 194. Differentapplication scenarios (for example, a time reminder, informationreceiving, an alarm clock, and a game) may also correspond to differentvibration feedback effects. A touch vibration feedback effect may befurther customized.

The indicator 192 may be an indicator light, and may be configured toindicate a charging status and a power change, or may be configured toindicate a message, a missed call, a notification, and the like.

The SIM card interface 195 is configured to connect to a SIM card. TheSIM card may be inserted into the SIM card interface 195 or removed fromthe SIM card interface 195, to implement contact with or separation fromthe electronic device 100. The electronic device 100 may support one ormore SIM card interfaces. The SIM card interface 195 may support anano-SIM card, a micro-SIM card, a SIM card, and the like. A pluralityof cards may be inserted into a same SIM card interface 195 at the sametime. The plurality of cards may be of a same type or different types.The SIM card interface 195 may be compatible with different types of SIMcards. The SIM card interface 195 is also compatible with an externalstorage card. The electronic device 100 interacts with a network throughthe SIM card, to implement functions such as conversation and datacommunication. In some embodiments, the electronic device 100 uses aneSIM, that is, an embedded SIM card. The eSIM card may be embedded intothe electronic device 100, and cannot be separated from the electronicdevice 100.

The electronic device 100 may implement an image shooting functionthrough the ISP, the camera 193, the video codec, the GPU, the display194, the application processor, and the like.

The ISP is configured to process data fed back by the camera 193. Forexample, during photographing, a shutter is pressed, and light istransmitted to a photosensitive element of the camera through a lens. Anoptical signal is converted into an electrical signal, and thephotosensitive element of the camera transmits the electrical signal tothe ISP for processing, to convert the electrical signal into a visibleimage. The ISP may further perform algorithm optimization on noise,brightness, and complexion of the image. The ISP may further optimizeparameters such as exposure and a color temperature of an image shootingscenario. Not limited to being integrated into the processor 110, theISP may also be disposed in the camera 193.

In this embodiment of this application, there may be M cameras 193, M≥2,and M is a positive integer. The electronic device 100 may enable Ncameras during multi-channel image shooting, N≤M, and N is a positiveinteger. A camera enabled by the electronic device 100 duringmulti-channel image shooting may also be referred to as a workingcamera.

The camera 193 includes a lens and a photosensitive element (which mayalso be referred to as an image sensor), and is configured to capture astatic image or a video. An optical image of an object is generatedthrough the lens, and is projected onto the photosensitive element. Thephotosensitive element may be a charge coupled device (charge coupleddevice, CCD) or a complementary metal-oxide-semiconductor (complementarymetal-oxide-semiconductor, CMOS) phototransistor. The photosensitiveelement converts an optical signal into an electrical signal, and thentransmits the electrical signal to the ISP to convert the electricalsignal into a digital image signal, for example, an image signal in astandard RGB or YUV format.

Hardware configurations and physical locations of the cameras 193 may bedifferent. Therefore, sizes, ranges, content, definition, or the like ofimages captured by different cameras may be different.

Image output sizes of the cameras 193 may be different, or may be thesame. An image output size of a camera refers to a length and a width ofan image captured by the camera. Both the length and the width of theimage may be measured by using a quantity of pixels. The image outputsize of the camera may also be referred to as an image size, an imagedimension, a pixel size, or image resolution. A common image outputratio of a camera may include 4:3, 16:9, 3:2, or the like. An imageoutput size ratio refers to an approximate ratio of a quantity of pixelsin a length to a quantity of pixels in a width of an image captured by acamera.

The camera 193 may correspond to a same focal length, or may correspondto different focal lengths. The focal length may include but is notlimited to: a first focal length less than a preset value 1 (forexample, 20 mm), a second focal length greater than or equal to thepreset value 1 and less than or equal to a preset value 2 (for example,50 mm), and a third focal length greater than the preset value 2. Acamera corresponding to the first focal length may be referred to as anultra-wide-angle camera, a camera corresponding to the second focallength may be referred to as a wide-angle camera, and a cameracorresponding to the third focal length may be referred to as along-focus camera. A larger focal length corresponding to a cameraindicates a smaller field of view (field of view, FOV) of the camera.The field of view refers to an angle range in which an optical systemcan perform imaging.

The camera 193 may be disposed on two sides of the electronic device. Acamera that is located on a same plane as the display 194 of theelectronic device may be referred to as a front-facing camera, and acamera that is located on a plane on which a rear cover of theelectronic device is located may be referred to as a rear-facing camera.The front-facing camera may be configured to capture an image of aphotographer facing the display 194, and the rear-facing camera may beconfigured to capture an image of a photographed object (such as aperson or a scenery) facing the photographer.

In some embodiments, the camera 193 may be configured to collect depthdata. For example, the camera 193 may have a time of flight (TOF) 3Dsensing module or a structured light (structured light) 3D sensingmodule, configured to obtain depth information. The camera configured tocollect depth data may be the front-facing camera, or may be therear-facing camera.

The video codec is configured to compress or decompress a digital image.The electronic device 100 may support one or more image codecs. In thisway, the electronic device 100 may open or store pictures or videos in aplurality of encoding formats.

The electronic device 100 may implement a display function by using theGPU, the display 194, the application processor, and the like. The GPUis a microprocessor for image processing, and is connected to thedisplay 194 and the application processor. The GPU is configured to:perform mathematical and geometric computation, and render an image. Theprocessor 110 may include one or more GPUs, which execute programinstructions to generate or change display information.

The display 194 is configured to display an image, a video, and thelike. The display 194 includes a display panel. The display panel may bea liquid crystal display (liquid crystal display, LCD), an organiclight-emitting diode (organic light-emitting diode, OLED), anactive-matrix organic light-emitting diode (active-matrix organiclight-emitting diode, AMOLED), a flexible light-emitting diode (flexiblelight-emitting diode, FLED), a mini-LED, a micro-LED, a micro-OLED, aquantum dot light-emitting diode (quantum dot light-emitting diode,QLED), and the like. In some embodiments, the electronic device 100 mayinclude one or more displays 194.

In some embodiments, in the multi-channel image shooting scenario, thedisplay 194 may display multi-channel images from the plurality ofcameras 193 in a manner such as stitching or picture-in-picture, so thatthe multi-channel images from the plurality of cameras 193 can besimultaneously presented to the user.

In some embodiments, in the multi-channel image shooting mode, theprocessor 110 (for example, the controller or the GPU) may synthesizethe plurality of frames of images from the plurality of cameras 193. Forexample, multi-channel video streams from the plurality of cameras 193are combined into one video stream, and a video encoder in the processor110 may encode data of the synthesized video stream, to generate a videofile. In this way, each frame of image in the video file may include aplurality of images from the plurality of cameras 193. When a frame ofimage of the video file is played, the display 194 may displaymulti-channel images from the plurality of cameras 193, so as topresent, to the user, a plurality of image pictures with differentranges, different definitions, or different detail information at a samemoment or in a same scenario.

In some embodiments, in the multi-channel image shooting mode, theprocessor 110 may separately associate image frames from differentcameras 193, so that when a shot picture or video is played, the display194 may simultaneously display the associated image frame in theviewfinder frame. In this case, videos simultaneously recorded bydifferent cameras 193 may be separately stored as different videos, andpictures simultaneously captured by different cameras 193 may beseparately stored as different pictures.

In some embodiments, in the multi-channel video mode, the plurality ofcameras 193 may separately capture images at a same frame rate. In otherwords, the plurality of cameras 193 capture a same quantity of imageframes within same time. Videos from different cameras 193 may beseparately stored as different video files, and the different videofiles are associated with each other. In the video files, image framesare stored in a sequence of capturing the image frames, and thedifferent video files include a same quantity of image frames. When therecorded videos are played, the display 194 may perform display based ona preset layout manner or a layout manner specified by the user and insequences of image frames included in associated video files, todisplay, on a same interface, a plurality of frames of images thatcorrespond to a same sequence and that are in different video files.

In some embodiments, in the multi-channel video mode, the plurality ofcameras 193 may separately capture images at a same frame rate. In otherwords, the plurality of cameras 193 capture a same quantity of imageframes within same time. The processor 110 may separately add atimestamp to each frame of image from different cameras 193, so thatwhen a recorded video is played, the display 194 may simultaneouslydisplay, on a same interface according to the timestamp, a plurality offrames of images from the plurality of cameras 193.

An image displayed by the electronic device in the preview frame from acamera is obtained by cropping an image captured by the camera. For amanner in which the electronic device crops the image captured by thecamera, refer to descriptions in subsequent embodiments.

For ease of use, the electronic device usually performs image shootingin a handheld mode of the user. However, a picture shot in the handheldmode of the user usually jitters. In some embodiments, in themulti-channel image shooting mode, the processor 110 may separatelyperform image stabilization processing on image frames captured bydifferent cameras 193. Then, the display 194 displays an image obtainedafter the image stabilization processing.

The following describes an example user interface that is on theelectronic device 100 and that is used for an application menu.

FIG. 2A shows an example of a user interface 21 that is on theelectronic device 100 and that is used for an application menu. As shownin FIG. 2A, the electronic device 100 may be provided with a pluralityof cameras 193, and the plurality of cameras 193 may include afront-facing camera and a rear-facing camera. There may be a pluralityof front-facing cameras, for example, a front-facing camera 193-1 and afront-facing camera 193-2. As shown in FIG. 2A, the front-facing camera193-1 and the front-facing camera 193-2 may be disposed on the top ofthe electronic device 100, for example, at a “notch” position of theelectronic device 100 (that is, an area AA shown in FIG. 2A). It may belearned that, in addition to the camera 193, the area AA may furtherinclude an illuminator 197 (not shown in FIG. 1 ), the speaker 170A, theoptical proximity sensor 180G, the ambient light sensor 180L, and thelike. In some embodiments, as shown in FIG. 2B, a rear-facing camera 193and the illuminator 197 may also be disposed on a rear side of theelectronic device 100. There may be a plurality of rear-facing cameras193, for example, a rear-facing wide-angle camera 193-3, a rear-facingultra-wide-angle camera 193-4, and a rear-facing long-focus camera193-5.

As shown in FIG. 2A, the user interface 21 may include a status bar 201,a tray 223 having a common application icon, a calendar indicator 203, aweather indicator 205, a navigation bar 225, and another applicationicon.

The status bar 201 may include one or more signal strength indicators201-1 of a mobile communication signal (which may also be referred to asa cellular signal), an operator indicator 201-2 of the mobilecommunication signal, a time indicator 201-3, a battery status indicator201-4, and the like.

The calendar indicator 203 may be used to indicate current time, forexample, a date, a day of the week, and hour and minute information.

The weather indicator 205 may be used to indicate a weather type such ascloudy to clear or light rain, and may be further used to indicateinformation such as a temperature.

The tray 223 having a common application icon may display a Phone icon223-1, a Messages icon 223-2, a Contacts icon 221-4, and the like.

The navigation bar 225 may include system navigation buttons such as aback button 225-1, a home screen (Gome screen) button 225-3, and acallout history button 225-5. When detecting that a user taps the backbutton 225-1, the electronic device 100 may display a previous page of acurrent page. When detecting that the user taps the home screen button225-3, the electronic device 100 may display a home screen. Whendetecting that the user taps the callout history button 225-5, theelectronic device 100 may display a task recently opened by the user.Names of the navigation buttons may alternatively be other names. Thisis not limited in this application. Not limited to a virtual button,each navigation button in the navigation bar 225 may alternatively beimplemented as a physical button.

Other application icons may be, for example, a WeChat (WeChat) icon 211,a QQ icon 212, a Twitter (Twitter) icon 213, a Facebook (Facebook) icon214, an Email icon 215, a Cloud Sharing icon 216, a Memo icon 217, aSettings icon 218, a Gallery icon 219, and a Camera icon 220. The userinterface 21 may further include a page indicator 221. Other applicationicons may be distributed on a plurality of pages, and the page indicator221 may be used to indicate a specific page on which an application iscurrently browsed by the user. The user may slide leftward or rightwardin an area including the other application icons, to browse anapplication icon on another page. When detecting that the user tapsthese application icons, the electronic device 100 may display a userinterface of the application.

In some embodiments, the user interface 21 shown in FIG. 2A may be ahome screen (Gome screen).

In some other embodiments, the electronic device 100 may further includea home screen button. The home screen button may be a physical button,or may be a virtual button (for example, the button 225-3). The homescreen button may be used to receive an instruction of the user, andreturn a currently displayed UI to the home screen, so that the user canview the home screen at any time.

It may be understood that FIG. 2A merely shows the example of the userinterface on the electronic device 100, and should not constitute alimitation on this embodiment of this application.

The following separately describes a typical image shooting scenario inthis application: a dual-channel video recording scenario.

As shown in FIG. 3A, the electronic device may detect a touch operationperformed on the Camera icon 220 (for example, a tap operation on theicon 22o). In response to the operation, the electronic device maydisplay a user interface 31 shown in FIG. 3B. The user interface 31 maybe a user interface of a default photo mode of “Camera”, and may be usedby a user to perform photographing by using a default rear-facingcamera. “Camera” is an image shooting application on an electronicdevice such as a smartphone or a tablet computer. A name of theapplication is not limited in this application. In other words, the usermay tap the icon 220 to open the user interface 31 of “Camera”. This isnot limited thereto. The user may further open the user interface 31 inanother application. For example, the user taps an image shootingcontrol in “WeChat” to open the user interface 31. “WeChat” is a socialapplication that allows the user to share a shot picture with others.

FIG. 3B shows an example of a user interface 31 of “Camera” on anelectronic device such as a smartphone. As shown in FIG. 3B, the userinterface 31 may include an area 301, an image shooting mode list 302, acontrol 303, a control 304, and a control 305.

The area 301 may be referred to as a preview frame 301 or a viewfinderframe 301. The preview frame 301 may be used to display an imagecaptured by the camera 193 in real time. The electronic device mayrefresh display content in the area 301 in real time, so that a userpreviews an image currently captured by the camera 193.

One or more image shooting mode options may be displayed in the imageshooting mode list 302. The one or more image shooting options mayinclude: a photo mode option 302A, a video mode option 302B, amulti-channel photo mode option 302C, a multi-channel video mode option302D, and a more option 302E. The one or more image shooting options maybe represented as text information on the interface, for example,“photo”, “video”, “multi-channel photo”, “multi-channel video”, and“more”. This is not limited thereto. The one or more image shootingoptions may alternatively be represented as icons or other forms ofinteractive elements (interactive elements, IEs) on the interface.

The control 303 may be configured to listen to a user operation thattriggers image shooting (photographing or video recording). Theelectronic device may detect a user operation on the control 303 (forexample, a tap operation on the control 303), and in response to theoperation, the electronic device 100 may save an image in the previewframe 301 as a picture in “Gallery”. When the user switches to the videomode, the control 303 may be changed to a control 901. The electronicdevice may detect a user operation on the control 901 (for example, atap operation on the control 901). In response to the operation, theelectronic device 100 may save the image in the preview frame 301 as avideo in “Gallery”. Herein, “Gallery” is a picture managementapplication in an electronic device such as a smartphone or a tabletcomputer, and may also be referred to as “Album”. A name of theapplication is not limited in this embodiment. “Gallery” may support theuser in performing various operations on a picture stored in theelectronic device, for example, operations such as browsing, editing,deleting, and selecting. In addition, the electronic device 100 mayfurther display a thumbnail of the stored image in the control 304. Inother words, the user may tap the control 303 or the control 901 totrigger image shooting. The control 303 or the control 901 may be abutton or a control in another form. In this application, the control303 may be referred to as a photographing control, and the control 901may be referred to as a video recording control. The control 303 and thecontrol 901 may be collectively referred to as an image shootingcontrol.

The control 305 may be configured to listen to a user operation thattriggers camera flipping. The electronic device 100 may detect a useroperation on the control 305 (for example, a tap operation on thecontrol 305), and in response to the operation, the electronic device100 may flip the camera, for example, switch a rear-facing camera to afront-facing camera. In this case, as shown in FIG. 3C, an imagecaptured by the front-facing camera is displayed in the preview frame301.

The electronic device 100 may detect a user operation performed on theimage shooting mode option, and the user operation may be used to selectan image shooting mode. In response to the operation, the electronicdevice 100 may enable the image shooting mode selected by the user.Particularly, when the user operation is performed on the more imageshooting mode option 302E, the electronic device 100 may further displaymore other image shooting mode options such as a slow-motion imageshooting mode option, to present more abundant image shooting functionsto the user. Not limited to that shown in FIG. 3B, the more imageshooting mode option 302E may not be displayed in the image shootingmode list 302, and the user may browse other image shooting mode optionsby sliding leftward/rightward in the image shooting mode list 302.

It can be learned that the user interface 31 may display, to the user, aplurality of image shooting functions (modes) provided by “Camera”, andthe user may select to enable an image shooting mode by tapping acorresponding image shooting mode option.

For example, when a user operation (for example, a tap operation) ofselecting the multi-channel video mode 302D is detected, the electronicdevice 100 may display a user interface shown in FIG. 3D. The previewframe 301 displays images from both the front-facing camera and therear-facing camera. In some embodiments, the electronic device 100 mayenable the multi-channel video mode by default after “Camera” isstarted. This is not limited thereto. The electronic device 100 mayfurther enable the multi-channel video mode in another manner. Forexample, the electronic device 100 may further enable the multi-channelvideo mode according to a voice instruction of the user. This is notlimited in this embodiment of this application.

It can be learned that, compared with the photo mode or the video mode,images from a plurality of cameras are simultaneously displayed in thepreview frame 301 in the multi-channel video mode. The preview frame 301includes two preview areas: 301A and 301B. An image from the rear-facingcamera is displayed in 301A, and an image from the front-facing camerais displayed in 301B.

Dual-channel video recording is used as an example. The followingdescribes a principle of dual-channel video recording with reference toFIG. 4A. As shown in FIG. 4A, it is assumed that both a front-facingcamera and a rear-facing camera that participate in dual-channel videorecording perform frame output at a ratio of 16:9 (a frame outputspecification is consistent with that in a common photo mode). An ISPprocesses an image frame output by a camera into an image in a standardformat (for example, YUV), crops an image frame output by thefront-facing camera to a ratio (for example, 10.5:9) required by thearea 301A, and crops an image frame output by the rear-facing camera toa ratio (for example, 9:9) required by the area 301B. Then, the ISPtransmits the output image to an HAL layer. After the HAL layer performselectronic image stabilization (electronic image stabilization, EIS)processing on the image, an image processing module stitches the twochannels of images. Then, a display may display a stitched image. Theimage processing module may include the image processor, the videocodec, the digital signal processor, and the like in the electronicdevice 100.

In this process, the display may further listen to a zoom event, andtransfer a zoom ratio to the ISP and a corresponding camera. The displaymay further listen to a camera switching event, and transfer the eventto a corresponding camera.

FIG. 4B is a schematic diagram of processing, by an ISP in a centercropping manner, an image output by a camera. As shown in FIG. 4B, arear-facing camera of an electronic device captures an image a. Theelectronic device crops the image a to obtain an image a1 in a croppingarea. The cropping area uses a center point O of the image a as acenter, and has a same ratio and size as the area 301A. In other words,the cropping area is an area in which a dashed box is located in theimage. The image a is displayed in the area 301A, that is, the image ais a preview image in the area 301A.

Similarly, a front-facing camera of the electronic device captures animage b. The electronic device crops the image b to obtain an image biin a cropping area. The cropping area uses a center point O of the imageb as a center, and has a same ratio and size as the area 301B. In otherwords, the cropping area is an area in which a dashed box is located inthe image. The image b is displayed in the area 301B, that is, the imageb is a preview image in the area 301B.

When performing multi-channel image shooting by using the electronicdevice, the user may change, by moving the electronic device, framing ofone of the cameras in a preview area corresponding to the camera.However, in this case, moving of the electronic device, that is, achange in a posture of the electronic device, causes a change of framingof a remaining camera in a corresponding preview area. This change maybe unnecessary or unexpected by the user. When the electronic device ismoved to change framing of one of the cameras in a preview areacorresponding to the camera, it cannot be ensured that framing ofanother camera in a corresponding preview area remains unchanged. Inother words, the user cannot consider framing of each camera in acorresponding preview area during multi-channel image shooting.

This is not limited to the dual-channel image shooting shown in theforegoing UI embodiments as an example, and the electronic device mayalternatively enter a more-channel image shooting mode.

FIG. 5 shows an example of a user interface displayed duringfour-channel video recording after the electronic device 100 enables the“multi-channel video mode”. As shown in FIG. 5 , a preview frame of theuser interface may be divided into four areas: an area 301A to an area301D. Each area may be used to display images from different cameras.For example, the area 301A may be used to display an image from therear-facing wide-angle camera 193-3, the area 301B may be used todisplay an image from the rear-facing ultra-wide-angle camera 193-4, thearea 301C may be used to display an image from the rear-facinglong-focus camera 193-5, and the area 301D may be used to display animage from the front-facing camera 193-1.

Based on the foregoing image shooting scenario, the following describessome embodiments of a user interface (user interface, UI) implemented onthe electronic device 100 by using dual-channel image shooting as anexample.

First, a user interface of the “multi-channel video mode” is described.

In some embodiments, the electronic device 100 may automatically enterthe “multi-channel video mode” by default after “Camera” is started. Insome other embodiments, after starting “Camera”, if the electronicdevice 100 does not enter the “multi-channel video mode”, the electronicdevice 100 may enter the “multi-channel video mode” in response to adetected user operation. For example, the electronic device 100 maydetect a touch operation (for example, a tap operation) performed on themulti-channel video mode option 302D on the user interface 31 shown inFIG. 3B or FIG. 3C, and enter the “multi-channel video mode” in responseto the operation. This is not limited thereto. The electronic device 100may further enter the “multi-channel video mode” in another manner. Forexample, the electronic device 100 may further enter the “multi-channelvideo mode” according to a voice instruction of the user. This is notlimited in this embodiment of this application.

FIG. 6A shows an example of a preview interface 41 displayed after theelectronic device 100 enters the “multi-channel video mode”. As shown inFIG. 6A, the preview interface 41 includes a preview frame 301, an imageshooting mode list 302, a control 901, a control 304, and a control 305.For the image shooting mode list 302, the control 304, and the control305, refer to related descriptions of the user interface 31. Details arenot described herein again. As shown in FIG. 6A, the multi-channel videomode option 302C is selected. The control 901 may be configured tolisten to a user operation that triggers video recording.

After entering the “multi-channel video mode”, the electronic device 100may capture images by using N (for example, 2) cameras, and display apreview interface on a display. A part or all of an image of each of theN cameras is displayed on the preview interface.

After the electronic device 100 enters the “multi-channel video mode”,the preview frame 301 may include N areas, and one area corresponds toone of the N cameras. Each of different areas is used to display a partor all of an image from a corresponding camera.

A location, in the preview frame 301, of each area included in thepreview frame 301, a size/dimension occupied by each area in the previewframe 301, and a camera corresponding to each area may be collectivelyreferred to as a layout manner during multi-channel video recording. Insome embodiments, areas included in the preview frame 301 do not overlapeach other and are stitched together into the preview frame 301. Inother words, the electronic device 100 may display images from the Ncameras in a stitching manner. In some other embodiments, areas includedin the preview frame 301 may overlap. In other words, the electronicdevice 100 may display images from the N cameras in a floating orsuperimposition manner.

For example, when N is 2, refer to FIG. 6A. A layout manner duringmulti-channel video recording shown in FIG. 6A may be as follows: Thepreview frame 301 is equally divided into areas 301A and 301B on theleft and right, the area 301A correspondingly displays an image from therear-facing wide-angle camera 193-3, and the area 301B correspondinglydisplays an image from the front-facing camera 193-1. For example,assuming that a size (that is, a screen resolution) of the display ofthe electronic device is 2340*1080, and a ratio is 19.5:9, a size of thearea 301A may be 1248*1080, and a ratio is 10.5:9, where 1248 and 1080are respectively quantities of pixels of the area 301A in terms of alength and a width. A size of the area 301B may be 1088*1080, and aratio is 10.5:9, where 1088 and 1080 are respectively quantities ofpixels of the area 301A in terms of a length and a width. It can belearned that a ratio of a total area obtained after the area 301A andthe area 302A are stitched is 19.5:9, which is the same as a ratio ofthe preview frame 301. That is, an area formed by stitching the area301A and the area 302A fills a display area of the display. As shown inFIG. 6A, an image in the area 301A is an image of a photographed object(such as a person or a scenery) facing a photographer, and an image inthe area 301B is an image of the photographer facing the display 194.

For another example, when N is 2, a layout manner during multi-channelvideo recording may be as follows: The preview frame 301 includes anarea 1 and an area 2, the area 1 occupies all of the preview frame 301,the area 2 is located in a lower right corner of the preview frame 301and occupies a quarter of the preview frame 301, the area 1correspondingly displays an image from the rear-facing ultra-wide-anglecamera 193-4, and the area 2 correspondingly displays an image from therear-facing wide-angle camera 193-3.

For another example, when N is 3, a layout manner during multi-channelvideo recording may be as follows: The preview frame 301 is equallydivided into three areas on the left, middle, and right. One areacorrespondingly displays an image from the rear-facing long-focus camera193-5, one area correspondingly displays an image from the rear-facingultra-wide-angle camera 193-4, and one area correspondingly displays animage from the front-facing camera 193-1.

It may be understood that, combination is performed based on differentsituations such as a shape, a size, and a location of each area in thepreview frame 301, and there may be a plurality of layout manners formulti-channel video recording, which are not listed one by one herein.

After the electronic device 100 enters the “multi-channel video mode”, aquantity N of cameras and a layout manner that are used by default formulti-channel video recording may be preset by the electronic device100, or may be autonomously set by the user, or may be a quantity ofcameras and a layout manner that are recently used by the user in the“multi-channel video mode”.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may further display, on the preview interface, acontrol used by the user to change a quantity of cameras and a layoutmanner. The electronic device 100 may display, in response to a touchoperation (for example, a tap operation) performed on the control, asetting interface used to set or change a quantity of cameras and alayout manner used in the “multi-channel video mode”. The user can setor change, on the setting interface, the quantity of cameras and thelayout manner used in the “multi-channel video mode”. A specificimplementation of the setting interface is not limited in thisembodiment of this application.

In some other embodiments, after entering the “multi-channel videomode”, the electronic device 100 may further change, in response to atouch operation (for example, a tap operation) on a control that is onthe preview interface and that is used to switch cameras, a cameracorresponding to an area in the layout manner. For example, the user maytap the control 304 in FIG. 6A, to change the camera corresponding tothe area 301A from the rear-facing wide-angle camera 193-3 to therear-facing ultra-wide-angle camera 193-4. In some embodiments, eacharea on the preview interface may include a corresponding control usedfor camera switching, and the electronic device 100 may change, inresponse to a touch operation on the control used for camera switchingin a preview area, a camera corresponding to the preview area.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may further display, in each area on the previewinterface, an identifier of a camera corresponding to the area, toprompt the user of a source of an image displayed in each area. Theidentifier of the camera may be implemented as a text, an icon, oranother form.

After the electronic device 100 enters the “multi-channel video mode”, apreview image displayed in each area of the preview frame 301 is a partor all of an image of each of the N cameras.

In some embodiments, after the electronic device 100 enables the“multi-channel video mode”, a preview image displayed in each area ofthe preview frame 301 may be obtained after the electronic device 100crops an image captured by a corresponding camera. That is, the previewarea displays a part of the preview image of the corresponding camera.The cropping manner may be, for example, center cropping or anothercropping manner. This is not limited in this application. The electronicdevice may crop images captured by different cameras in differentmanners. A manner in which the electronic device crops the imagescaptured by the N cameras may be preset by the electronic device, or maybe autonomously set by the user, or may be a cropping manner recentlyused by the user in the “multi-channel video mode”.

Center cropping means that the electronic device 100 crops, from animage by using a center of the image captured by a camera as a center, apart that is of the image and that has a same size as a correspondingarea.

For example, refer to FIG. 4B. An image captured by the rear-facingwide-angle camera 193-3 is a, and a preview image displayed in the area301A is a part that is cropped by the electronic device 100 by using acenter of the image a as a center and that has a same size as the area301A. Similarly, refer to FIG. 6F. An image captured by the front-facingcamera 193-1 is b, and an image displayed in the area 301B is a partthat is cropped by the electronic device 100 by using a center of theimage b as a center and that has a same size as the area 301B.

In some other embodiments, if a size of an image captured by a camera isthe same as a size of a preview area corresponding to the camera, theelectronic device 100 may directly display the image in the area withoutcropping. That is, the preview area displays the image captured by thecamera.

In the following embodiments of this application, it is assumed thatafter the electronic device 100 enables the “multi-channel video mode”,the preview image in the area 301A is an image obtained by theelectronic device by cropping, in a cropping area centered a point O andhaving a first size, an image captured by a camera corresponding to thearea 301A. That is, after the electronic device 100 enables the“multi-channel video mode”, the cropping area in the image captured bythe camera corresponding to the area 301A uses the point O as thecenter, and is the first size.

FIG. 6A to FIG. 6F, FIG. 7A to FIG. 7F, FIG. 8A and FIG. 8B, and FIG. 9Ato FIG. 9E show examples of embodiments of adjusting a preview imagedisplayed in each area on a preview interface after the electronicdevice 100 enters the “multi-channel video mode”.

It should be noted that in embodiments shown in FIG. 6A to FIG. 6F, FIG.7A to FIG. 7F, FIG. 8A and FIG. 8B, and FIG. 9A to FIG. 9E, a posture ofthe electronic device 100 does not change. In other words, whenadjusting the preview image displayed in each area on the previewinterface of the electronic device, the user does not move theelectronic device 100. In this way, when the user adjusts framing of onecamera in a preview area corresponding to the camera, it can be ensuredthat framing of another camera in a corresponding preview area remainsunchanged. In other words, the user can consider framing of each camerain a corresponding preview area during multi-channel image shooting.

In addition, although the posture of the electronic device 100 does notchange, an external environment may change. In other words, the cameraof the electronic device 100 may collect an image updated in real time.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may adjust framing of a working camera in apreview area in a non-zoom scenario.

FIG. 6A to FIG. 6F show an example of a manner in which the electronicdevice 100 adjusts framing of a working camera in a preview area in anon-zoom scenario.

Refer to FIG. 6A. The electronic device 100 may detect a slidingoperation (for example, a horizontal leftward sliding operation)performed on the area 301A. Refer to FIG. 6B. The electronic device 100may update a cropping area in the image a in response to the slidingoperation, to refresh a preview image displayed in the area 301A. Theimage a is an image captured by a camera corresponding to the area 301A.

A center of the cropping area in the updated image a is a point O1 ofthe image a, and a size of the cropping area is a second size. Thesecond size is equal to the first size.

If an area that uses O1′ as a center and that is of the second size doesnot exceed an edge of the image a, O1 is located at O1′. If the areathat uses O1′ as a center and that is of the second size exceeds theedge of the image a, O1 is located at a center of an area that coincideswith the edge of the image a and that is of the second size.

O1′ is determined by the point O of the image a and a sliding trackcorresponding to the sliding operation. Specifically, O1 is located in afirst direction of O, and the first direction is a reverse direction ofthe sliding track. A distance between O1′ and the point O is positivelycorrelated to a length of the sliding track. In some embodiments, thedistance between O1′ and the point O is the same as the length of thesliding track. O is a center of the cropping area before the update, andthe first size is a size of the cropping area before the update.

FIG. 6C shows an example of an updated cropping area of the electronicdevice 100. The updated cropping area is an area in which a dashed boxis located. A preview image displayed in the refreshed area 301A is animage a1.

In some embodiments, if a speed at which the user enters the slidingoperation exceeds a threshold, a distance between O1 and the point O maybe a default distance. In other words, when the user quickly slides, theelectronic device determines O1 based on the default distance.

Similarly, refer to FIG. 6D. The electronic device 100 may furtherdetect a sliding operation (for example, a horizontal rightward slidingoperation) performed on the area 301B. The user interfaces shown in FIG.6D and FIG. 6B are the same. Refer to related descriptions. Refer toFIG. 6E. The electronic device 100 may update a cropping area in theimage b in response to the sliding operation, to refresh a preview imagedisplayed in the area 301B. For a manner in which the electronic deviceupdates the cropping area in the image b, refer to the manner in whichthe electronic device updates the cropping area in the image a. FIG. 6Fshows an example of an updated cropping area in the image b of theelectronic device 100. The updated cropping area is an area in which adashed box is located. A preview image displayed in the refreshed area301B is an image b1.

According to embodiments shown in FIG. 6A to FIG. 6F, after theelectronic device 100 enters the “multi-channel video mode”, the usermay be supported in separately adjusting framing of each working camerain a preview area corresponding to the working camera duringmulti-channel video recording, so that framing of each working camera inthe preview area corresponding to the working camera does not affecteach other, to avoid a problem that a change of framing of a workingcamera in a corresponding preview area causes a change of framing ofanother working camera in a corresponding preview area. Such a framingmanner during multi-channel video recording is more flexible andconvenient, and user experience can be improved.

It can be learned from embodiments shown in FIG. 6A to FIG. 6F that theelectronic device may display the preview interface and the part or allof the image captured by each of the N (for example, 2) cameras. Thepreview interface includes N areas, and the part or all of the imagecaptured by each of the N cameras is displayed in one of the N areas.

Herein, a preview area generally displays a part of an image captured bya corresponding camera. However, when the user reduces a zoom ratio (forexample, 0.7X), a preview area may display an entire image captured by acorresponding camera.

A first area (for example, the area 301A) may be one of the N areas, anda camera corresponding to the first area may be referred to as a firstcamera (for example, the camera corresponding to the area 301A). Thefirst area may display an image obtained by the electronic device bycropping an entire image captured by the first camera before thecropping manner is changed based on a user operation. Before thecropping manner is changed, a manner in which the electronic devicecrops the entire image captured by the first camera is not limited inembodiments of this application. In a specific embodiment, before thecropping manner is changed, in this embodiment of this application, theelectronic device crops, in a center cropping manner, the entire imagecaptured by the first camera.

If the electronic device detects a sliding operation in a first area,the electronic device may change, based on the sliding operation, amanner of cropping the entire image captured by the first camera, torefresh a preview image displayed in the first area. Before and afterthe refreshing, the electronic device crops the entire image captured bythe first camera in different manners. In the entire image captured bythe first camera, locations of preview images before and after therefreshing in the entire image captured by the first camera aredifferent.

For example, a location of the preview image displayed in the first areabefore the refreshing may be, for example, a location of the croppingarea before the update in FIG. 6A to FIG. 6F, or a location of thepreview image displayed in the first area before the refreshing may be,for example, a location of the cropping area after the update in FIG. 6Ato FIG. 6F.

For a relationship between a location of a second preview image and alocation of a first preview image, refer to the foregoing descriptions.

In some embodiments, in the entire image captured by the first camera, adirection in which a central location of the preview image displayed inthe first area before the refreshing points to a central location of thepreview image displayed in the first area after the refreshing isopposite to a sliding direction of the sliding operation.

If the user sliding operation is a leftward sliding operation, thepreview image displayed in the first area after the refreshing is closerto a right boundary of the entire image captured by the first camerathan the preview image displayed in the first area before therefreshing.

If the sliding user operation is a rightward sliding operation, thepreview image displayed in the first area after the refreshing is closerto a left boundary of the entire image captured by the first camera thanthe preview image displayed in the first area before the refreshing.

In some embodiments, a central location of the preview image displayedin the first area before the refreshing coincides with a centrallocation of the entire image captured by the first camera.

In some embodiments, the preview images displayed in the first areabefore and after the refreshing are of a same size.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may adjust framing of a working camera in apreview area in a zoom scenario. Zooming means that a preview imagedisplayed in each area on a preview interface is zoomed in or zoomedout.

FIG. 7A to FIG. 7F show an example of a manner in which the electronicdevice 100 adjusts framing of a working camera in a preview area in azoom scenario.

Refer to FIG. 7A. A user interface 51 shown in FIG. 7A is a previewinterface displayed after the electronic device 100 enters the“multi-channel video mode”. The user interface 51 includes a previewframe 301, an image shooting mode list 302, a control 901, a control304, and a control 305. The preview frame 301 includes an area 301A andan area 301B. For a function of each control and a preview imagedisplayed in each area on the user interface 51, refer to relateddescriptions of the user interface 41 shown in FIG. 6A. Details are notdescribed herein again.

As shown in FIG. 7A and FIG. 7B, the electronic device 100 may detect atwo-finger zoom gesture (for example, a gesture of sliding outwards withtwo fingers shown in the figure) in the area 301A, display, in responseto the two-finger zoom gesture, a control 306 used to indicate a zoomratio of a corresponding camera in the area 301A, and update a croppingarea in an image a, to refresh a preview image displayed in the area301A. The image a is an image captured by the camera corresponding tothe area 301A.

The control 306 may be implemented as an icon or a text, and the zoomratio of the corresponding camera indicated by the control 306 changeswith the two-finger zoom gesture. When the two-finger zoom gesture is atwo-finger zoom-in gesture, a larger amplitude of the gesture indicatesa larger zoom ratio of the corresponding camera. When the two-fingerzoom gesture is a two-finger zoom-out gesture, a larger amplitude of thegesture indicates a smaller zoom ratio of the corresponding camera. Forexample, a text “ix” in FIG. 7A indicates that a zoom ratio of a camerais 1, and a text “2x” in the control 306 in FIG. 7B indicates that thezoom ratio of the camera is 2.

An example in which before the two-finger zoom gesture is detected, thezoom ratio of the camera corresponding to the area 301A is 1, and afterthe two-finger zoom gesture is received, the zoom ratio of the camera isx1 is used for description. A center of the cropping area in the updatedimage a is a point O of the image a, and a size of the cropping area isa third size.

A length of the third size is 1/x1 of a length of a first size, and awidth of the third size is 1/x1 of a width of the first size. That is,the first size is 1/x12 of the first size. O is a center of the croppingarea before the update, and the first size is a size of the croppingarea before the update.

FIG. 7C shows an example of an updated cropping area of the electronicdevice 100. The updated cropping area is an area in which a dashed boxis located. A preview image displayed in the refreshed area 301A is animage a2.

As shown in FIG. 7B, because sizes of an image a2 and the area 301A aredifferent, the electronic device 100 may zoom in pixels of the image a2through “interpolation” processing, to zoom in the image a2 to theentire area 301A for display.

In some embodiments, when the two-finger zoom gesture is a two-fingerzoom-in gesture, if an amplitude of the two-finger zoom-in gestureexceeds a first preset value, the camera corresponding to the area 301Amay be automatically switched to a camera with a larger focal length,for example, switched from a wide-angle camera to a long-focus camera.When the two-finger zoom gesture is a two-finger zoom-out gesture, if anamplitude of the two-finger zoom-out gesture exceeds a second presetvalue, the camera corresponding to the area 301A may be automaticallyswitched to a camera with a smaller focal length, for example, switchedfrom a wide-angle camera to an ultra-wide-angle camera.

FIG. 7D to FIG. 7F show an example of a manner in which the electronicdevice 100 adjusts framing of a working camera in a preview area in azoom scenario.

The user interface 51 shown in FIG. 7D is the same as the user interface51 shown in FIG. 7B. Refer to related descriptions.

Refer to FIG. 7D. The electronic device 100 may detect a slidingoperation (for example, a horizontal leftward sliding operation)performed on the area 301A. A direction and a track of the slidingoperation are not limited in this embodiment of this application.

Refer to FIG. 7E. The electronic device 100 may update a cropping areain the image a again in response to the sliding operation, to refresh apreview image displayed in the area 301A. The image a is an imagecaptured by the camera corresponding to the area 301A.

A manner in which the electronic device updates the cropping area in theimage a again in response to the sliding operation is the same as amanner in which the electronic device updates the cropping area in theimage a in response to the sliding operation shown in FIG. 6A to FIG.6F. Refer to related descriptions.

For example, a center of the re-updated cropping area in the image a isO2, and a size of the cropping area is the third size.

If an area that uses O2′ as a center and that is of the third size doesnot exceed an edge of the image a, O2 is located at O2′. If the areathat uses O2′ as a center and that is of the third size exceeds the edgeof the image a, O2 is located at a center of an area that coincides withthe edge of the image a and that is of the third size.

O2′ is determined by the point O of the image a and a sliding trackcorresponding to the sliding operation. Specifically, O2′ is located ina first direction of O, and the first direction is a reverse directionof the sliding track. A distance between O2′ and the point O ispositively correlated to a length of the sliding track. In someembodiments, the distance between O2′ and the point O is the same as thelength of the sliding track.

FIG. 7F shows an example of a re-updated cropping area of the electronicdevice 100. The re-updated cropping area is an area in which a dashedbox is located. A preview image displayed in the refreshed area 301A isan image a3.

In some embodiments, if the area that uses O2′ as a center and that isof the third size exceeds the edge of the image a, the electronic device100 may automatically switch the camera corresponding to the area 301A.The electronic device 100 may switch the camera corresponding to thearea 301A to a camera with a larger field of view. For example, if aninitial camera that is of the electronic device 100 and that iscorresponding to the area 301A is a long-focus camera, the electronicdevice 100 may switch the long-focus camera to a wide-angle camera. Thiscan fully meet a requirement of a user for adjusting framing of eacharea within a larger field of view.

According to embodiments shown in FIG. 7A to FIG. 7F, after theelectronic device 100 enters the “multi-channel video mode”, the usermay be supported in separately adjusting framing of each working camerain a preview area corresponding to the working camera duringmulti-channel video recording, so that framing of each working camera inthe preview area corresponding to the operating camera does not affecteach other, to avoid a problem that a change of framing of a workingcamera in a corresponding preview area causes a change of framing ofanother working camera in a corresponding preview area. Such a framingmanner during multi-channel video recording is more flexible andconvenient, and user experience can be improved.

After adjusting the preview image of each area on the preview interfacein the zoom scenario, the electronic device 100 may further zoom again,to increase or decrease a zoom ratio of a camera corresponding to anarea. The following provides descriptions by using an example in whichafter adjusting the framing of the working camera in the preview area inthe zoom scenario shown in FIG. 7A to FIG. 7F, the electronic device 100zooms again for the camera corresponding to the area 301A.

In some embodiments, after adjusting a preview image of each area on apreview interface in a zoom scenario, the electronic device 100 maydetect a two-finger zoom gesture (for example, a gesture of slidingoutwards with two fingers) acting on the area 301A, and update acropping area in an image a in response to the two-finger zoom gesture,to refresh a preview image displayed in the area 301A. The image a is animage captured by the camera corresponding to the area 301A. Herein, amanner in which the electronic device 100 updates the cropping area inthe image a in response to the two-finger zoom gesture is the same as amanner in which the electronic device updates the cropping area in theimage a in response to the two-finger zoom gesture shown in FIG. 7A toFIG. 7C. Refer to related descriptions.

For example, refer to FIG. 8A. FIG. 8A shows a possible updated croppingarea in an image a. As shown in FIG. 8A, a preview image displayed in arefreshed area 301A is an image a4.

For example, refer to FIG. 8B. FIG. 8B shows another possible updatedcropping area in an image a. As shown in FIG. 8B, a preview imagedisplayed in a refreshed area 301A is an image a4.

It can be learned from the foregoing manner in which the electronicdevice 100 adjusts the framing of the working camera in the preview areain the zoom scenario shown in FIG. 7A to FIG. 7F that,

before detecting a sliding operation (for example, the sliding operationin FIG. 7A to FIG. 7F), the electronic device may further detect anoperation (for example, the two-finger zoom operation in FIG. 7A to FIG.7F) used to change a zoom ratio of a camera corresponding to a firstarea. Then, in response to the operation, the electronic device may zoomin a preview image displayed in the first area before the operation isreceived, and display the zoomed-in preview image in the first area. Itshould be noted that, after the zoom ratio of the camera correspondingto the first area is changed, the first area displays a zoomed-inpartial image. For details, refer to related descriptions in FIG. 7A toFIG. 7F.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may track a target object, and autonomously adjustthe framing of the working camera in the preview area based on alocation of the target object. In this way, user operations can bereduced, and convenience can be improved.

FIG. 9A to FIG. 9E show an example of a manner in which an electronicdevice tracks a target object and autonomously adjusts framing of aworking camera in a preview area.

Refer to FIG. 9A. A user interface 71 shown in FIG. 9A is a previewinterface displayed after the electronic device 100 enters the“multi-channel video mode”. The user interface 71 includes a previewframe 301, an image shooting mode list 302, a control 901, a control304, and a control 305. The preview frame 301 includes an area 301A andan area 301B. For a function of each control and a preview imagedisplayed in each area on the user interface 71, refer to relateddescriptions of the user interface 41 shown in FIG. 6A. Details are notdescribed herein again.

In some embodiments, after entering the “multi-channel video mode”, theelectronic device 100 may automatically identify an object in thepreview image displayed in each area in the preview frame 301, andprompt a user when detecting an object of a preset type. The object ofthe preset type may include a face, an animal, a human body, the sun,the moon, and the like. The object of the preset type may be set by theelectronic device 100 by default, or may be autonomously selected by theuser.

In some other embodiments, after entering the “multi-channel videomode”, the electronic device 100 may start to identify, in response to areceived user operation, the object in the preview image displayed ineach area in the preview frame 301, and prompt the user when detectingthe object of the preset type. The user operation may be atouch-and-hold operation or a double-tap operation in an area, an inputvoice instruction, or the like. This is not limited in this embodimentof this application.

For example, as shown in FIG. 9A, the electronic device 100 may detectthat a face is displayed in the area 301B, and display promptinformation 307 in the area 301B. The prompt information 307 is used toprompt the user that a face is detected, and the prompt information 307may be a text “ face detected”.

Refer to FIG. 9B. In some embodiments, the electronic device 100 maydetect a touch operation (for example, a tap operation) performed on anobject (for example, a face in FIG. 9B) in the area 301B, and select anobject on which the touch operation is performed as a to-be-trackedtarget object. In some embodiments, after selecting the to-be-trackedtarget object, the electronic device 100 may display prompt informationin an area for displaying the target object in the area 301B, forexample, a dashed box shown in FIG. 9B, to prompt the user that theobject has been currently selected as the to-be-tracked target object.

In some other embodiments, after detecting an object of a preset type,the electronic device 100 may further directly select the object as theto-be-tracked target object without a user operation.

After selecting the to-be-tracked target object, the electronic device100 updates a cropping area in an image b by using the target object asa center, to refresh a preview image displayed in the area 301B. Theimage b is an image captured by a camera corresponding to the area 301B.

After the electronic device 100 selects the to-be-tracked target object,the prompt information 307 in the area 301B may be used to prompt theuser that the target object is currently being tracked. For example,refer to FIG. 9B and FIG. 9C. The prompt information 307 may be changedto a text “Face tracking in progress”.

Refer to FIG. 9C and FIG. 9E. If the image b captured by thefront-facing camera 193-1 corresponding to the area 301B still includesthe target object, a center of the updated cropping area in the image bis O4 in the image b, and a size of the cropping area is a fourth size.O4 a center of the cropping area in the image b before the update, andthe fourth size is a size of the cropping area in the image b before theupdate.

If an area that uses O4′ as a center and that is of the fourth size doesnot exceed an edge of the image b, O4 is located at O4′. If the areathat uses O4′ as a center and that is of the fourth size exceeds theedge of the image b, O4 is located at a center of an area that coincideswith the edge of the image b and that is of the fourth size. O4′ is acenter of the image b where the target object is located.

FIG. 9D and FIG. 9E show an example of an updated cropping area of theelectronic device 100. The updated cropping area is an area in which adashed box is located. A preview image displayed in the refreshed area301B is an image in the dashed box.

As shown in FIG. 9D and FIG. 9E, a location of a target face in an imagecaptured by the front-facing camera 193-1 changes, but the electronicdevice 100 still displays the target face at a central location of thearea 301B.

After a period of time, if the image captured by the front-facing camera193-1 corresponding to the area 301B does not include the target object,the electronic device 100 may stop tracking the target person. In someembodiments, the electronic device 100 may prompt the user that trackingthe target person is currently stopped. A prompt manner may include butis not limited to: displaying a text, displaying an icon, playing avoice, or the like.

According to embodiments shown in FIG. 9A to FIG. 9E, the electronicdevice 100 may track the target object in a multi-channel videorecording process, to meet a user requirement and improve userexperience.

According to embodiments shown in FIG. 9A to FIG. 9E, after detectingthat an entire image captured by a first camera includes an image of afirst face (for example, the face image in FIG. 9A to FIG. 9E), theelectronic device may display a preview image in a first area (forexample, the area 302B in FIG. 9A to FIG. 9C). Then, if the electronicdevice detects that a location of the image of the first face in theentire image captured by the first camera changes, the electronic devicerefreshes the preview image in the first area. A preview image displayedin the first area before the refreshing is obtained by cropping theentire image captured by the first camera, and includes the image of thefirst face. A preview image displayed in the first area after therefreshing is obtained by cropping the entire image captured by thefirst camera, and includes the image of the first face.

For example, for the preview image displayed in the first area beforethe refreshing, refer to the preview image displayed in the area 301B inFIG. 9A or FIG. 9B, and for the preview image displayed in the firstarea after the refreshing, refer to the preview image displayed in thearea 301B in FIG. 9C.

In some embodiments, a manner in which the electronic device performscropping to obtain the preview image displayed in the refreshed firstarea may be: ensuring that a location of the image of the first face inthe refreshed first area is the same as a location of the image of thefirst face in the first area before the refreshing. In this way, it canbe ensured that a location of the face in the first area is fixed.

In some embodiments, the electronic device performs cropping, by using alocation of the image of the first face in the entire image captured bythe first camera as a center, to obtain the preview image displayed inthe refreshed first area, as shown in FIG. 9A. This can keep the facebeing displayed in the center of the first area during face tracking.

In some other embodiments of this application, when detecting that theentire image captured by the first camera includes the image of thefirst face, the electronic device may start a second camera. A framingrange of the second camera is greater than a framing range of the firstcamera, and the first face is within the framing range of the secondcamera. Then, the electronic device may refresh the preview imagedisplayed in the first area. A preview image displayed in the first areaafter the refreshing is obtained by cropping an entire image captured bythe second camera, and includes the image of the first face. In thisway, it can be ensured that when an object is tracked, the camera isswitched to expand a traceable range.

In some embodiments, the first camera is a front-facing camera or arear-facing camera. In this way, both the front-facing camera and therear-facing camera can be used to implement object tracking.

In this embodiment of this application, after the electronic device 100enters the “multi-channel video mode”, when adjusting the framing rangeof the working camera in the preview area, the electronic device 100 mayfurther prompt, in a picture-in-picture manner, the user of a locationof the preview image displayed by the working camera in the preview areain the captured entire image. In this way, the user can learn of theentire picture.

FIG. 10A-1 to FIG. 10B-2 show an example of a scenario in which theelectronic device 100 prompts, in a picture-in-picture manner, a user ofa location of a preview image displayed by a working camera in a previewarea in a captured entire image.

Refer to FIG. 10A-1 to FIG. 10B-2 . User interfaces 81 shown in FIG.10A-1 to FIG. 10B-2 are preview interfaces displayed after theelectronic device 100 enters the “multi-channel video mode”. For eachcontrol in the preview interface, refer to related descriptions of theuser interface 41 shown in FIG. 6A. Details are not described hereinagain.

As shown in FIG. 10A-1 to FIG. 10B-2 , a window 308 may be displayed onthe user interface 81. The window 308 may be displayed in a floatingmanner on an image displayed in an area 301A. The window 308 may be usedto prompt the user of a location of a preview image displayed in thecurrent area 301A in an entire image captured by the correspondingrear-facing wide-angle camera 193-3.

As shown in FIG. 10A-1 to FIG. 10B-2 , an image captured by therear-facing wide-angle camera 193-3 corresponding to the area 301A maybe displayed in the window 308, and a dashed box is used to identify alocation of the preview image displayed in the area 301A in an entireimage captured by a camera. In the window 308, different display formsmay be used for parts inside and outside the dashed box. For example,shadows may be added to parts outside the dashed box, to furtherdistinguish a part that is cropped in an image a captured by therear-facing wide-angle camera 193-3 and that is displayed in the area301A.

As shown in FIG. 10B-1 and FIG. 10B-2 , when a location at which thepreview image displayed in the area 301A is located in the image acaptured by the rear-facing wide-angle camera 193-3 changes, a locationin the dashed box in the window 308 also correspondingly changes.

According to embodiments shown in FIG. 10A-1 to FIG. 10B-2 , a user canlearn, by using a window displayed in each area, a framing range of eachcamera in a corresponding area and a location of a preview imagecurrently displayed in each area in the entire picture. In this way, theuser can more conveniently adjust the preview image displayed in eacharea.

It may be understood that the picture-in-picture prompt manner shown inFIG. 10A-1 to FIG. 10B-2 is applicable to any scenario in which theelectronic device 100 adjusts the preview image displayed in each areaon the preview interface mentioned in the foregoing embodiments.

When adjusting the preview image displayed in each area on the previewinterface in the non-zoom scenario shown in FIG. 6A to FIG. 6F, theelectronic device 100 may prompt, in a picture-in-picture manner, theuser of a location of the preview image displayed in the area 3o1A inthe entire image captured by the camera. In this case, a location of thedashed box in the window 308 changes with a sliding operation input bythe user. A moving direction of the dashed box is opposite to a trackdirection of the sliding operation.

When adjusting the preview image displayed in each area on the previewinterface in the zoom scenario shown in FIG. 7A to FIG. 7F, theelectronic device 100 may prompt, in a picture-in-picture manner, theuser of a location of the preview image displayed in the area 3o1A inthe entire image captured by the camera. In this case, a size of thedashed box is inversely proportional to a zoom ratio. A larger zoomratio indicates a smaller dashed box. A moving direction of the dashedbox is opposite to a track direction of the sliding operation input bythe user.

When autonomously adjusting the preview image in each area on thepreview interface based on a location of a target object shown in FIG.9A to FIG. 9E, the electronic device may prompt, in a picture-in-picturemanner, the user of a location of the preview image displayed in thearea 301A in the entire image captured by the camera. In this case, thelocation of the dashed box changes with the location of the targetobject in the image captured by the camera.

According to embodiments shown in FIG. 6A to FIG. 6F, FIG. 7A to FIG.7F, FIG. 8A and FIG. 8B, and FIG. 9A to FIG. 9E, the user may adjustframing of each working camera by performing a user operation withoutmoving the electronic device 100, that is, when a posture of theelectronic device 100 does not change, and adjustment of framing of asingle working camera does not affect framing of another working camera.

In some embodiments, if the electronic device 100 detects an operationof adjusting a preview image displayed in each area on the previewinterface (for example, the sliding operation, the two-finger zoomoperation, or the operation of selecting the target object mentioned inthe foregoing embodiments), if the posture of the electronic devicechanges, the electronic device may not change, in response to the useroperation, a manner of cropping the entire image captured by the cameracorresponding to each area. That is, if the posture of the electronicdevice changes, the electronic device does not respond to the useroperation used to adjust the framing of each camera in the preview area.

In some embodiments, if the posture of the electronic device greatlychanges, that is, the user greatly moves or rotates the mobile phone,the electronic device may obtain, in a center cropping manner, thepreview image displayed in each area on the preview interface.

The following describes a UI embodiment in which a preview imagedisplayed in each area on an image shooting interface is adjusted in avideo recording process of multi-channel video recording after theelectronic device 100 enables the “multi-channel video mode”.

FIG. 11A to FIG. 11F show examples of UI embodiments in which theelectronic device 100 adjusts, in a multi-channel video recordingprocess, a preview image displayed in each area on an image shootinginterface.

FIG. 11A shows an example of an image shooting interface 101 displayedwhen an electronic device enters a video recording process afterenabling the “multi-channel video mode”.

As shown in FIG. 11A, the image shooting interface 101 includes apreview frame 301, an image shooting mode list 302, a control 901, acontrol 304, and a control 305. For the image shooting mode list 302,the control 304, and the control 305, refer to related descriptions ofthe user interface 31. Details are not described herein again. As shownin FIG. 11A, a multi-channel video mode option 302D is selected.

The image shooting interface 101 may be displayed by the electronicdevice 100 in response to a touch operation (for example, a tapoperation) received on a control used for video recording. The controlused for video recording may be, for example, the control 901 displayedon any user interface in FIG. 11A to FIG. 11F. The control used forvideo recording may also be referred to as an image shooting control.

As shown in FIG. 11A, the image shooting interface 101 further includesa recording time indicator 1001 The recording time indicator 1001 isused to indicate duration for which a user displays the image shootinginterface 101, that is, duration for which the electronic device 100starts to record a video. The recording time indicator 1001 may beimplemented as a text.

After the electronic device 100 enables the “multi-channel video mode”,a preview frame 301 on an image shooting interface is the same as apreview frame 301 on a preview interface. For a layout manner of thepreview frame 301, refer to related descriptions in the foregoingembodiment in FIG. 6A. Details are not described herein again.

In a video recording process after the electronic device 100 enables the“multi-channel video mode”, a preview image displayed in each area onthe image shooting interface may also be adjusted based on a useroperation. A manner in which the electronic device 100 adjusts, in avideo recording process, the preview image displayed in each area on theimage shooting interface is the same as a manner in which the electronicdevice 100 adjusts, in a preview process, the preview image displayed ineach area on the preview interface. Refer to the foregoing embodimentsshown in FIG. 6A to FIG. 6F, FIG. 7A to FIG. 7F, FIG. 8A and FIG. 8B,and FIG. 9A to FIG. 9E.

In this embodiment of this application, in a video recording processafter the electronic device 100 enters the “multi-channel photo mode”,an image displayed on the preview interface in the video recordingprocess may be further saved.

Specifically, in the video recording process when the electronic device100 is in the “multi-channel photo mode”, after adjusting the previewimage in each area in the preview frame, the user may select to save thepreview image in the preview frame in the video recording process, thatis, save the video. For a manner in which the user adjusts the previewimage of each area in the preview frame, refer to related contentdescribed in the foregoing embodiments in FIG. 11A to FIG. 11F.

For example, in the video recording process, the electronic device 100may record, in response to the touch operation (for example, the tapoperation) detected on the control used for video recording, the previewimage in the preview frame in the video recording process. The controlused for video recording may be, for example, the control 901 displayedon any user interface in FIG. 11A to FIG. 11F. Start time and end timeof the video recording process are respectively time points at which twoadjacent touch operations on the control 901 are detected after theelectronic device 100 enables the “multi-channel video mode”.

In some embodiments, the electronic device 100 may synthesize imagesdisplayed in all areas in the preview frame in the video recordingprocess into a video file, and store the video file. For example, theelectronic device 100 may synthesize a layout manner corresponding to animage displayed in the area 301A and a layout manner corresponding to apreview image displayed in the area 302B in the video recording processinto a video file, and store the video file. In this way, afteradjusting a preview image of each area based on a requirement of theuser, the user can save a desired preview image, so that the user canobtain more flexible and convenient video recording experience.

In some other embodiments, the electronic device 100 may also separatelystore images displayed in each area in the video recording process, andassociate the stored multi-channel images.

It may be understood that the user may change a layout manner of thepreview interface in the video recording process. If the electronicdevice 100 changes the layout manner of the preview interface in thevideo recording process, layout manners of video files stored in theelectronic device 100 in different time periods may be different. Thiscan provide more flexible recording experience for the user.

After the electronic device 100 stores the preview image displayed inthe preview frame as a video file, the user may view, on a userinterface provided by “Gallery”, the video file stored in the electronicdevice 100.

An embodiment of this application further provides a solution in whichan electronic device is supported not to change a framing range of aselected preview area when the electronic device is moved, that is, whena posture of the electronic device changes. In this way, even if theposture of the electronic device changes, the framing range of theselected preview area can be not affected.

After entering the “multi-channel video mode”, the electronic device 100may lock one or more areas in a preview frame in a preview process or avideo recording process. Then, even if a physical location of theelectronic device 100 changes, for example, the electronic device 100 istranslated, a relative location of a static object in an image displayedin the locked area in the area remains unchanged. In this way, when auser moves the electronic device 100 to change an image displayed inanother area, it can be ensured that the locked area always displays animage at a physical location in the real world, that is, a framing rangeof the locked area is not changed.

FIG. 12A and FIG. 12B show an example of UI interfaces in which aviewfinder range of a selected preview area is not changed when aposture of the electronic device 100 changes.

FIG. 12A may be a preview interface in displayed in response to anoperation used to lock an area 301B after the electronic device 100enters the “multi-channel video mode”.

As shown in FIG. 12A, the preview interface in includes a preview frame301, an image shooting mode list 302, a control 303, a control 304, acontrol 305, and a lock indicator 1101. The preview frame 301 includesan area 301A and the area 301B. For a function of each control and apreview image displayed in each area on the user interface 71, refer torelated descriptions of the user interface 41 shown in FIG. 6A. Detailsare not described herein again. The lock indicator 1101 is located inthe area 301B and is used to indicate that the area 301B is locked. Thelock indicator 1101 may be implemented as a text, an icon, or anotherform.

An operation used to lock the area 301B may include but is not limitedto: a touch-and-hold operation performed on the area 301B, a double-tapoperation, a touch operation performed on a specific control (not shownin FIG. 12A), an operation of shaking the electronic device 100, and thelike.

Refer to FIG. 12A and FIG. 12B. A user may hold the electronic device100 to move horizontally to the left. After the electronic device 100 ishorizontally moved, images captured by the rear-facing wide-angle camera193-3 corresponding to the area 301A and the front-facing camera 193-1corresponding to the area 301B are both refreshed or updated.

In response to the operation of moving horizontally to the left, theelectronic device 100 crops, in a cropping manner corresponding to thecurrent area 301A, an entire image captured by the rear-facingwide-angle camera 193-3, and then displays the image in the area 301A.The cropping manner may be center cropping or another cropping mannerdetermined based on a user operation.

In response to the operation of moving horizontally to the left, theelectronic device 100 keeps a display manner of displaying, in thelocked area 301B, a static object in an image when the area 301B islocked unchanged. A display manner of the static object includes a sizeof the static object and a relative location of the static object in thearea 301B. In other words, the electronic device 100 ensures that thelocked area displays an image at a same physical location in the realworld, and the physical location is a physical location corresponding toa preview image displayed in the area when the area is locked. Forexample, refer to FIG. 12A and FIG. 12B. After the electronic device 100moves horizontally, the area 301B still displays an image at a samephysical location. Display manners of clouds, buildings, and roads inthe image remain unchanged, and a person in the image changes a positionto stand.

According to an extended embodiment, from the perspective of the user,in a process of moving the electronic device 100, it can be ensured thatone or more areas are locked, that is, it can be ensured that previewimages displayed in the locked one or more areas always correspond to asame physical location. In this way, the user can consider multi-channelimages in a multi-channel image shooting process.

It may be understood that the extended embodiment may be applied to apreview process in the “multi-channel video mode”, a preview process inthe “multi-channel video mode”, and a video recording process in the“multi-channel video mode” mentioned in embodiments of this application.In other words, the electronic device 100 may lock one or more areas inthe preview frame in the preview process in the “multi-channel videomode”, the preview process in the “multi-channel video mode”, and thevideo recording process in the “multi-channel video mode”. Specificimplementation may be obtained with reference to the preview process andthe video recording process described in the foregoing embodiments.Details are not described herein again.

In this embodiment of this application, the electronic device mayfurther adjust, after entering the “multi-channel photo mode”, thepreview image displayed in each area on the preview interface. That is,the electronic device may further adjust a manner of framing of aworking camera in a preview area in the “multi-channel photo mode”.

For a manner in which the electronic device adjusts the framing of theworking camera in the preview area in the “multi-channel photo mode”,refer to the manner in which the electronic device adjusts the framingof the working camera in the preview area in the “multi-channel videomode”. Refer to the foregoing related descriptions. Details are notdescribed.

FIG. 13A and FIG. 13B provide an example of a scenario in which after anelectronic device enters the “multi-channel photo mode”, a preview imagedisplayed in each area on a preview interface is adjusted in response toa sliding operation.

The following describes, with reference to FIG. 14 , how software andhardware of the electronic device 100 in embodiments of this applicationcollaborate to perform a framing method for multi-channel photographingand video recording provided in embodiments of this application.

As shown in FIG. 14 , after entering the “multi-channel image shootingmode”, the electronic device 100 may collect data by using N cameras.

Each of the N cameras outputs a frame according to a default imageoutput ratio, and transfers collected raw data to a corresponding ISP.The default image output ratio of a camera may be, for example, 4:3,16:9, or 3:2.

The ISP is configured to convert data from a camera into an image in astandard format, for example, YUV.

A display may listen to a user operation used to adjust a preview imagein each area on the display, and report the user operation obtainedthrough listening to the camera or a HAL layer. The user operation mayinclude but is not limited to a sliding operation, a two-finger zoomoperation and sliding operation, a touch operation acting on a targetobject, and the like that are detected in each area in a preview frameafter the electronic device 100 enters the “multi-channel image shootingmode” mentioned in the foregoing UI embodiments. For example, thedisplay may listen to a zoom event, and transfer a zoom ratio to the HALlayer and a corresponding camera. The display may further listen to acamera switching event, and transfer the event to a correspondingcamera. The display may listen to a sliding operation, and transfer atrack of the sliding operation to the HAL layer.

The HAL layer is used to crop, based on a user operation, an imageoutput by the ISP.

When the display or another component (for example, a microphone) doesnot listen to a user operation used to adjust a preview image in eacharea on the display, the HAL layer crops, in a center cropping manner,the image output by the ISP.

When the display or another component (for example, a microphone)listens to a user operation used to adjust a preview image in each areaon the display, the HAL layer crops, according to the user operation,the image output by the ISP. The user operation used to adjust a previewimage in each area on the display may include but is not limited to asliding operation, a two-finger zoom operation and sliding operation, atouch operation acting on a target object, and the like that aredetected in each area in a preview frame after the electronic device 100enters the “multi-channel image shooting mode” mentioned in theforegoing UI embodiments. For a manner in which the HAL layer crops,according to a user operation, an image output by the ISP, refer torelated descriptions in the foregoing UI embodiments.

Then, the HAL layer may notify the ISP of the manner in which the HALlayer crops the image output by the ISP. The ISP performs auto exposure,auto white balance, auto focus (auto exposure, auto white balance, autofocus, 3A) processing on the cropped image based on the cropping manner,and may further perform algorithm optimization on noise, brightness, andcomplexion of the cropped image.

An image obtained after cropping at the HAL layer and 3A andoptimization processing of the ISP is transferred to an image processingmodule, and the image processing module is configured to performelectronic image stabilization (electronic image stabilization)processing on the received image. The HAL layer may further notify theimage processing module of the manner in which the HAL layer crops theimage output by the ISP, so that the image processing module performsimage stabilization processing on the received image based on thecropping manner.

The image processing module may obtain N-channel images after processingeach channel of received images. The image processing module may stitchor superimpose the obtained N-channel images into one-channel imageaccording to a current layout style, and output the one-channel image toa preview interface of the display. In other words, the previewinterface may display the N-channel images in N areas according to thecurrent layout style.

The image processing module may include the image processor, the videocodec, the digital signal processor, and the like in the electronicdevice 100.

In some embodiments, after the electronic device 100 enters the“multi-channel photo mode”, if the display detects a touch operationdetected on an image shooting control, the electronic device stores animage that is output by the image processing module to the previewinterface of the display when the touch operation is detected.

In some embodiments, after the electronic device 100 enables the“multi-channel video mode”, if the display detects two touch operationsdetected on the image shooting control, the electronic device stores animage that is output by the image processing module to the previewinterface of the display in a time period between the two touchoperations.

In the foregoing UI embodiments, in a multi-channel video recordingscenario, the area 301A or the area 301B in the preview frame 301 may bereferred to as a first area, for example, the area 301A or the area 301Bin FIG. 6A to FIG. 6F, FIG. 7A to FIG. 7F, FIG. 9A to FIG. 9E, FIG.10A-1 to FIG. 10B-2 , and FIG. 11A to FIG. 11F.

A camera corresponding to the area 301A or the area 301B, for example, afront-facing camera or a rear-facing camera, may be referred to as afirst camera.

A sliding operation received in the area 301A or the area 301B on thepreview interface may be referred to as a first user operation, forexample, sliding operations in FIG. 6A, FIG. 6D, and FIG. 7D.

An operation that is detected by the electronic device on an imageshooting interface and that indicates to start recording a video may bereferred to as a second user operation. The second user operation maybe, for example, an operation performed on the image shooting control901, for example, an operation performed on the image shooting control901 in FIG. 11A.

Before the first user operation is detected, a preview image displayedin the area 301A or the area 301B may be referred to as a first previewimage, for example, the image displayed in the area 301A or the area301B in embodiments in FIG. 6A to FIG. 6F, and the image (the image a2)displayed in the area 301A in FIG. 7D.

After the first user operation is detected, a preview image displayed inthe area 301A or the area 301B may be referred to as a second previewimage, for example, the image (the image a1 or b1) displayed in the area301A or the area 301B in embodiments in FIG. 6A to FIG. 6F, and theimage displayed in the area 301A in FIG. 7E.

A two-finger zoom-in operation received in the area 301 or the area 301Bon the preview interface may be referred to as a third user operation,for example, the two-finger zoom-in operation shown in FIG. 7A.

A sliding operation received in the area 301 or the area 301B on theimage shooting interface may be referred to as a fourth user operation,for example, the sliding operation in FIG. 11A. After the fourth useroperation is detected, a preview image displayed in the area 301A or thearea 301B on the image shooting interface may be referred to as a thirdpreview image, for example, the image displayed in the area 301A in FIG.11A.

When a posture of the electronic device changes, an image displayed bythe electronic device in the first area may be referred to as a fourthpreview image.

When the electronic device detects a face in an entire image captured bythe first camera, the image displayed in the first area may be referredto as a fifth preview image, for example, the image displayed in thearea 301B in FIG. 9A. When a location of the face detected by theelectronic device changes in the entire image captured by the firstcamera, the image displayed by the electronic device in the first areamay be referred to as a sixth preview image, for example, the imageshown in FIG. 9B or FIG. 9C.

When the electronic device tracks the face, if the camera is switched, aswitched camera may be referred to as a second camera. In this case, animage that is from the second camera and that is displayed in the firstarea may be referred to as a seventh preview image. When a location ofthe face detected by the electronic device changes in an entire imagecaptured by the second camera, the image displayed by the electronicdevice in the first area may be referred to as an eighth preview image.

An operation that is detected by the electronic device on an imageshooting interface and that indicates to stop recording a video may bereferred to as a fifth user operation. The fifth user operation may be,for example, an operation performed on the image shooting control 901,for example, an operation performed on the image shooting control 901 inFIG. 11B to FIG. 11F.

An operation for playing a video file that is detected by the electronicdevice may be referred to as a sixth user operation. An interface thatis in the electronic device and that is used to play the video file maybe referred to as a playback interface.

In a scenario in which a posture of the electronic device changes and aframing range of a selected preview area is not changed, an operationused to lock the area may be referred to as a seventh user operation.The seventh user operation may be, for example, a touch-and-holdoperation or a double-tap operation performed on the area 301B. Afterthe area is locked, an operation that is detected by the electronicdevice and that indicates to start recording a video may be referred toas an eighth user operation. The eighth user operation may be, forexample, a tap operation performed on the image shooting control 901 inFIG. 12B.

After the seventh user operation is detected and before the posture ofthe electronic device changes, a preview image displayed in the area301A or the area 301B may be referred to as a ninth preview image, forexample, the image displayed in the area 301A in FIG. 12A. After theposture of the electronic device changes, the preview image displayed inthe area 301A or the area 301B may be referred to as a tenth previewimage, for example, the image displayed in the area 301A in FIG. 12B.

Based on the electronic device 100 and the UI embodiments described inthe foregoing content, the following embodiment describes a framingmethod for multi-channel video recording provided in this application.As shown in FIG. 15 , the method may include the following steps.

Phase 1 (S101 to S105): Enable a “multi-channel video mode”.

S101: The electronic device 100 starts Camera.

For example, the electronic device 100 may detect a touch operation (forexample, a tap operation on the icon 220) performed on the icon 220 ofCamera shown in FIG. 3A, and start Camera in response to the operation.

S102: The electronic device 100 detects a user operation of selectingthe “multi-channel video mode”.

For example, the user operation may be a touch operation (for example, atap operation) on the multi-channel video mode option 302D shown in FIG.3B or FIG. 3D. The user operation may also be another type of useroperation such as a voice instruction.

This is not limited to a user selection. The electronic device 100 mayselect the “multi-channel video mode” by default after starting Camera.

S103: The electronic device 100 starts N cameras, where N is a positiveinteger.

Specifically, the electronic device may have M cameras. M≥2, M≥N, and Mis a positive integer. The N cameras may be a combination of afront-facing camera and a rear-facing camera. Alternatively, the Ncameras may be any combination of a plurality of cameras of a wide-anglecamera, an ultra-wide-angle camera, a long-focus camera, or afront-facing camera. A camera combination manner of the N cameras is notlimited in this application.

The N cameras may be selected by the electronic device by default. Forexample, the electronic device enables the front-facing camera and therear-facing camera by default. Alternatively, the N cameras may beselected by a user. For example, the user may select, from a “More” modeoption, which cameras are to be enabled.

S104: The electronic device 100 captures images by using the N cameras.

S105: The electronic device 100 displays a preview interface, where thepreview interface includes N areas, and a part or all of an imagecaptured by each of the N cameras may be displayed in one of the Nareas.

As shown in FIG. 6A, the preview interface includes the area 301A andthe area 301B. The area 301A displays a partial image captured by therear-facing camera, and the area 301B displays a partial image capturedby the front-facing camera. In this case, N=2, and the N cameras are therear-facing camera and the front-facing camera.

Images respectively displayed in the N areas may be referred to aspreview images. A preview image displayed in an area may be obtained bycropping an entire image captured by a camera corresponding to the area.

The preview interface shown in FIG. 6A is used as an example. Thepreview image displayed in the area 301A may be obtained by theelectronic device by cropping an entire image captured by therear-facing camera, and the preview image displayed in the area 301B isobtained by the electronic device by cropping an entire image capturedby the front-facing camera. Specifically, a central location of thepreview image displayed in the area 301A may coincide with a centrallocation of the entire image captured by the rear-facing camera, and acentral location of the preview image displayed in the area 301B maycoincide with a central location of the entire image captured by thefront-facing camera. In this case, the preview images displayed in thearea 301A and the area 301B are obtained in a center cropping manner.

At a 1x rate, a size of a cropping area of the preview image that isdisplayed in the area 301A and that is cropped from the entire imagecaptured by the rear-facing camera may be the same as a size of the area301A. Similarly, at the ix rate, a size of a cropping area of thepreview image that is displayed in the area 301B and that is croppedfrom the entire image captured by the front-facing camera may be thesame as a size of the area 301B.

Possibly, when a zoom ratio of a camera in the N cameras is reduced, forexample, reduced to 0.7X, a preview image displayed by the camera in anarea corresponding to the camera may be an entire image captured by thecamera. For example, the user may reduce a zoom ratio by performing anoperation of pinching two fingers in the area 301A, to view, in the area301A, the entire image captured by the rear-facing camera. The operationof pinching two fingers may also be referred to as a two-finger zoom-outoperation.

This is not limited to a horizontal screen splitting manner shown inFIG. 6A. There may be a plurality of layout manners of the area 301A andthe area 301B on the preview interface, for example, apicture-in-picture manner. This is not limited in this application.

Phase 2 (S106 and S107): Adjust a framing range of a camera on thepreview interface.

S106: The electronic device 100 detects a first user operation in afirst area. The first area may be one of the N areas, a first previewimage may be displayed in the first area, and the first preview image isobtained by cropping an entire image captured by a first camera.

The preview interfaces shown in FIG. 6A and FIG. 6B are used asexamples. The first area may be the area 301A, the first preview imagemay be the preview image displayed in the area 301A, and the firstcamera may be the rear-facing camera. In this case, the first useroperation may be a sliding operation in the area 301A, for example, aleftward sliding operation or a rightward sliding operation. The firstuser operation may also be another type of user operation such as avoice instruction for the area 301A.

S107: The electronic device 100 displays a second preview image in thefirst area. The second preview image is also obtained by cropping theentire image captured by the first camera. In the entire image capturedby the first camera, a location of the second preview image is differentfrom a location of the first preview image.

The preview interfaces shown in FIG. 6A to FIG. 6F are used as examples.When a leftward sliding operation in the area 301A is detected, comparedwith the first preview image, a central location of the second previewimage displayed in the area 301A deviates from a central location of thefirst preview image, and is no longer a central location of the entireimage captured by the rear-facing camera. In this way, the user maychange, by using a sliding operation, a framing range presented by therear-facing camera in the area 301A.

Specifically, if the first user operation is a leftward slidingoperation, the second preview image is closer to a right boundary of theentire image captured by the first camera than the first preview image.As shown in FIG. 6A to FIG. 6C, the preview image displayed in the area301A shown in FIG. 6B is closer to a right boundary of the entire imagecaptured by the rear-facing camera than the preview image displayed inthe area 301A shown in FIG. 6A. In this way, the user may view, byperforming a leftward sliding operation in the area 301A, an imagecloser to the right boundary of the entire image captured by therear-facing camera, for example, enable a right-side object in theentire image captured by the rear-facing camera to appear in the area301A.

Specifically, if the first user operation is a rightward slidingoperation, the second preview image is closer to a left boundary of theentire image captured by the first camera than the first preview image.As shown in FIG. 6D to FIG. 6F, the preview image displayed in the area301B shown in FIG. 6F is closer to a left boundary of the entire imagecaptured by the front-facing camera than the preview image displayed inthe area 301B shown in FIG. 6D. In this way, the user may view, byperforming a rightward sliding operation in the area 301B, an imagecloser to the left boundary of the entire image captured by thefront-facing camera, for example, enable a left-side object in theentire image captured by the rear-facing camera to appear in the area301A.

The second preview image may be the same size as the first previewimage. A central location of the first preview image may coincide with acentral location of the entire image captured by the first camera.

When the first user operation in the first area occurs, the previewimage in the first area changes from the first preview image to thesecond preview image, but a framing range of a preview image in anotherarea on the preview interface does not change. In other words, when thefirst user operation is detected, in an entire image captured by anothercamera (which may be referred to as a second camera) in the N cameras, alocation of a preview image B is the same as a location of a previewimage A. The preview image A is a preview image displayed in anotherarea (which may be referred to as a second area) before the first useroperation occurs, and the preview image B is a preview image displayedin the second area after the first user operation occurs. In this way,the user may separately adjust a framing range presented by a camera onthe preview interface, without affecting a framing range presented byanother camera on the preview interface.

After the first user operation in the first area occurs, that is, afterthe user adjusts the framing range of the first camera on the previewinterface, the user may further adjust a framing range of another cameraon the preview interface. For example, the electronic device may detecta user operation such as leftward sliding or rightward sliding inanother area (which may be referred to as the second area), and changethe preview image displayed in the second area from a preview image C toa preview image D. In the entire image captured by the second camera, alocation of the preview image D is different from a location of thepreview image C. In this way, the user may change, by using the useroperation such as leftward sliding or rightward sliding in the secondarea, a framing range presented by the second camera in the second area.

Phase 3 (S108 and S109): Record a video.

S108: The electronic device 100 detects a second user operation. Thesecond user operation is a user operation indicating to start to recorda video, for example, a tap operation on the control 303 shown in FIG.6A.

S109: The electronic device 100 starts to record a video, and displaysan image shooting interface, where the image shooting interface alsoincludes the N areas.

In a video recording process, the user may also adjust, by performing auser operation such as leftward sliding or rightward sliding, a framingrange presented by a camera on the image shooting interface. A specificprocess is the same as that in which the user adjusts the framing rangeof the camera on the preview interface. Similarly, when the electronicdevice detects a user operation (for example, a leftward slidingoperation or a rightward sliding operation) performed in the first area,in the entire image captured by the first camera, a location of apreview image displayed in the first area is different from a locationof a preview image previously displayed in the first area. Herein, theprevious means that before the electronic device detects the useroperation (for example, the leftward sliding operation or the rightwardsliding operation) in the first area.

After adjusting framing of a camera on the preview interface, the usermay further adjust, by using the leftward sliding operation or therightward sliding operation, a framing range presented by the camera onthe image shooting interface. Specifically, the electronic device maydetect the leftward sliding operation or the rightward sliding operation(which may be referred to as a fourth user operation) in the first areaon the image shooting interface, and display a third preview image ofthe first camera in the first area. The third preview image is obtainedby cropping the entire image captured by the first camera. In the entireimage captured by the first camera, a location of the third previewimage is different from a location of the second preview image.

Phase 4 (S110 to S113): Complete video recording and play a video file.

S110: The electronic device detects a user operation indicating to stoprecording a video, for example, a tap operation on the control 303 shownin FIG. 6A. The user operation may be referred to as a fifth useroperation.

S111: The electronic device stops recording a video, and generates avideo file.

Specifically, each frame of image in the video file includes a previewimage displayed in each area. Specifically, stitching processing may befirst performed on the preview image displayed in each area.

S112: The electronic device detects a user operation (which may bereferred to as a sixth user operation) of opening the video file.

S113: The electronic device displays a playback interface, where theplayback interface also includes the N areas.

It can be learned that, according to the framing method formulti-channel video recording provided in this embodiment of thisapplication, the user can separately adjust, during multi-channel imageshooting, framing presented by each working camera in a preview frame,so that framing of each working camera does not affect each other, toavoid a problem that a change of framing of a working camera causes achange of framing of another working camera.

Further, the framing method for multi-channel video recording providedin this embodiment of this application may further provide a facetracking function. Specifically, when the electronic device detects thatthe entire image captured by the first camera includes an image of afirst face, the electronic device may display a fifth preview image inthe first area. The fifth preview image is obtained by cropping theentire image captured by the first camera, and the fifth preview imagemay include the image of the first face. When the electronic devicedetects that a location of the image of the first face in the entireimage captured by the first camera changes, the electronic devicedisplays a sixth preview image in the first area. The sixth previewimage is obtained by cropping the entire image captured by the firstcamera, and the sixth preview image also includes the image of the firstface.

A location of the image of the first face in the sixth preview image maybe the same as a location of the image of the first face in the fifthpreview image. The image of the first face may be in a central area ofthe fifth preview image.

To further expand a traceable range of the face, when the electronicdevice detects that the entire image captured by the first cameraincludes the image of the first face, the electronic device may startthe second camera. The second camera may be a wide-angle camera or anultra-wide-angle camera, and a framing range of the second camera isgreater than a framing range of the first camera. The first face iswithin the framing range of the second camera. In this case, theelectronic device may display a seventh preview image in the first area.When the electronic device detects that a location of the image of thefirst face in an entire image captured by the second camera changes, theelectronic device displays an eighth preview image in the first area.The seventh preview image is obtained by cropping the entire imagecaptured by the second camera, and the seventh preview image includesthe image of the first face. The eighth preview image is obtained bycropping the entire image captured by the second camera, and the eighthpreview image includes the image of the first face.

A location of the image of the first face in the seventh preview imagemay be the same as a location of the image of the first face in theeighth preview image. The image of the first face may be in a centralarea of the seventh preview image.

The face tracking function is applicable to a front-facing imageshooting scenario, or is applicable to a rear-facing image shootingscenario. That is, the first camera may be a front-facing camera, or maybe a rear-facing camera.

Further, the framing method for multi-channel video recording providedin this embodiment of this application may further provide a function ofadjusting framing under zoom. Specifically, the electronic device mayfurther detect a third user operation before detecting the first useroperation. The third user operation may be used to magnify a zoom ratio,for example, a user operation in which two fingers change from pinchingto stretching. In response to the third user operation, the electronicdevice may zoom in the first preview image, and displays a zoomed-infirst preview image in the first area. It may be understood that, if asize of the first preview image is the same as that of the first area atthe ix rate, the zoomed-in first preview images cannot be fullydisplayed in the first area. The electronic device may display a partialimage of the first preview image in the first area, and the partialimage may be in the central area of the first preview image.

In the framing method for multi-channel video recording provided in thisembodiment of this application, when the electronic device detects thefirst user operation, if a posture of the electronic device does notchange, the electronic device displays the second preview image of thefirst camera in the first area. In other words, the electronic deviceadjusts the framing range of the camera on the preview interface basedon the first user operation only when the posture of the electronicdevice does not change. When detecting the first user operation, if theposture of the electronic device changes, the electronic device maydisplay a fourth preview image of the first camera in the first area.The fourth preview image may be obtained by cropping the entire imagecaptured by the first camera, and a central location of the fourthpreview image coincides with a central location of the entire framedimage of the first camera. In other words, when the posture of theelectronic device changes, the electronic device may not adjust theframing range of the camera on the preview interface based on the firstuser operation detected at this time, so that the user changes opticalframing by adjusting the posture of the electronic device.

For content that is not mentioned in the method embodiment in FIG. 15 ,refer to the foregoing UI embodiment. Details are not described hereinagain.

The foregoing descriptions are merely specific implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement readily figured out by aperson skilled in the art within the technical scope disclosed in thisapplication shall fall within the protection scope of this application.Therefore, the protection scope of this application shall be subject tothe protection scope of the claims.

1. A framing method for multi-channel video recording comprising:enabling, by an electronic device, N cameras, wherein the electronicdevice has M cameras, M≥2, N≤M, and M and N are positive integers;capturing, by the electronic device, images by using with the N cameras;displaying, by the electronic device, a preview interface and a part orall of an image captured by each of the N cameras, wherein the previewinterface comprises N areas, and the part or all of the image capturedby each of the N cameras is displayed in one of the N areas; detecting,by the electronic device, a first user operation in a first area,wherein the first area is one of the N areas, a first preview image isdisplayed in the first area, and the first preview image is obtained bycropping an entire image captured by a first camera; displaying, by theelectronic device, a second preview image in the first area, wherein thesecond preview image is also obtained by cropping the entire imagecaptured by the first camera, and wherein, in the entire image capturedby the first camera, a location of the second preview image is differentfrom a location of the first preview image; detecting, by the electronicdevice, a second user operation; starting, by the electronic device, torecord a video; and displaying an image shooting interface, wherein theimage shooting interface comprises the N areas.
 2. The method accordingto claim 1, wherein the first user operation comprises a slidingoperation, and wherein, in the entire image captured by the firstcamera, a direction in which a central location of the first previewimage points to a central location of the second preview image isopposite to a sliding direction of the sliding operation.
 3. The methodaccording to claim 2, wherein the second preview image is closer to aright boundary of the entire image captured by the first camera than thefirst preview image based on the first user operation being a leftwardsliding operation.
 4. The method according to claim 2, wherein thesecond preview image is closer to a left boundary of the entire imagecaptured by the first camera than the first preview image based on thefirst user operation being a rightward sliding operation.
 5. The methodaccording to claim 1, wherein a central location of the first previewimage coincides with a central location of the entire image captured bythe first camera.
 6. The method according to claim 1, wherein the firstpreview image has a same size as the second preview image.
 7. The methodaccording to claim 1, further comprising: detecting, by the electronicdevice, a third user operation before detecting the first useroperation; zooming in, by the electronic device, the first previewimage; and displaying a zoomed-in first preview image in the first area.8. The method according to claim 1, further comprising: detecting, bythe electronic device, a fourth user operation in the first area on theimage shooting interface; and displaying, by the electronic device, athird preview image of the first camera in the first area on the imageshooting interface, wherein the third preview image is obtained bycropping the entire image captured by the first camera, and wherein, inthe entire image captured by the first camera, a location of the thirdpreview image is different from the location of the second previewimage.
 9. The method according to claim 1, wherein the displaying, bythe electronic device, a second preview image of the first camera in thefirst area comprises: displaying, by the electronic device, based ondetecting the first user operation, and based on a posture of theelectronic device not changing, the second preview image of the firstcamera in the first area; and wherein the method further comprises:displaying, by the electronic device, based on detecting the first useroperation, and based on the posture of the electronic device changing, afourth preview image of the first camera in the first area, wherein thefourth preview image is obtained by cropping the entire image capturedby the first camera, and a central location of the fourth preview imagecoincides with a central location of an entire framed image of the firstcamera.
 10. The method according to claim 1, further comprising:detecting, by the electronic device, that the entire image captured bythe first camera comprises an image of a first face; displaying, by theelectronic device, a fifth preview image in the first area, wherein thefifth preview image is obtained by cropping the entire image captured bythe first camera, and the fifth preview image comprises the image of thefirst face; detecting, by the electronic device, that a location of theimage of the first face in the entire image captured by the first camerachanges; and displaying, by the electronic device, a sixth preview imagein the first area, wherein the sixth preview image is obtained bycropping the entire image captured by the first camera, and the sixthpreview image comprises the image of the first face.
 11. The methodaccording to claim 10, wherein a location of the image of the first facein the sixth preview image is the same as a location of the image of thefirst face in the fifth preview image.
 12. The method according to claim10, wherein the image of the first face is in a central area of thefifth preview image.
 13. The method according to claim 1, furthercomprising: detecting, by the electronic device, that the entire imagecaptured by the first camera comprises an image of a first face;enabling, by the electronic device, a second camera, wherein a framingrange of the second camera is greater than a framing range of the firstcamera, and the first face is within the framing range of the secondcamera; displaying, by the electronic device, a seventh preview image inthe first area, wherein the seventh preview image is obtained bycropping an entire image captured by the second camera, and the seventhpreview image comprises the image of the first face; detecting, by theelectronic device, that a location of the image of the first face in theentire image captured by the second camera changes; and displaying, bythe electronic device, an eighth preview image in the first area,wherein the eighth preview image is obtained by cropping the entireimage captured by the second camera, and the eighth preview imagecomprises the image of the first face.
 14. The method according to claim13, wherein a location of the image of the first face in the seventhpreview image is the same as a location of the image of the first facein the eighth preview image.
 15. The method according to claim 13,wherein the image of the first face is in a central area of the seventhpreview image.
 16. The method according to claim 10, wherein the firstcamera is a front-facing camera or a rear-facing camera.
 17. The methodaccording to claim 1, wherein the method further comprises: detecting,by the electronic device, a fifth user operation; stopping, by theelectronic device, recording a video; generating a video file;detecting, by the electronic device, a sixth user operation for thevideo file; and displaying, by the electronic device, a playbackinterface, wherein the playback interface comprises the N areas.
 18. Aframing method for multi-channel video recording, applied to anelectronic device having a display and M cameras, wherein M≥2, and M isa positive integer, wherein the method comprises: enabling, by anelectronic device, N cameras, wherein the electronic device has Mcameras, M≥2, N≤M, and M and N are positive integers; capturing, by theelectronic device, images with the N cameras; displaying, by theelectronic device, a preview interface and a part or all of an imagecaptured by each of the N cameras, wherein the preview interfacecomprises N areas, and the part or all of the image captured by each ofthe N cameras is displayed in one of the N areas; detecting, by theelectronic device, a seventh user operation in a first area; detecting,by the electronic device, that a posture of the electronic devicechanges; displaying, by the electronic device, a ninth preview image inthe first area, wherein a framing range of the ninth preview image isthe same as a framing range of a tenth preview image, the tenth previewimage is an image displayed in the first area before the posture of theelectronic device changes, the ninth preview image is obtained bycropping an entire image captured by a first camera after the posture ofthe electronic device changes, and the tenth preview image is obtainedby cropping the entire image captured by the first camera before theposture of the electronic device changes; detecting, by the electronicdevice, an eighth user operation; starting, by the electronic device, torecord a video based on detecting the eighth user operation; anddisplaying an image shooting interface, wherein the image shootinginterface comprises the N areas.
 19. An electronic device comprising: adisplay; M cameras, wherein M 2, M is a positive integer; a touchsensor; one or more processors; and a non-transitory computer-readablestorage medium storing a program to be executed by the one or moreprocessors, the program including instructions to: enable, by theelectronic device, N cameras, wherein N≤M, and N is a positive integer;capture, by the electronic device, images with the N cameras; display,by the electronic device, a preview interface and a part or all of animage captured by each of the N cameras, wherein the preview interfacecomprises N areas, and the part or all of the image captured by each ofthe N cameras is displayed in one of the N areas; detect, by theelectronic device, a first user operation in a first area, wherein thefirst area is one of the N areas, a first preview image is displayed inthe first area, and the first preview image is obtained by cropping anentire image captured by a first camera; display, by the electronicdevice, a second preview image in the first area, wherein the secondpreview image is also obtained by cropping the entire image captured bythe first camera, and wherein, in the entire image captured by the firstcamera, a location of the second preview image is different from alocation of the first preview image; detect, by the electronic device, asecond user operation; start, by the electronic device, to record avideo; and display an image shooting interface, wherein the imageshooting interface comprises the N areas. 20-22. (canceled)
 23. Theelectronic device according to claim 19, wherein the first useroperation comprises a sliding operation, and wherein, in the entireimage captured by the first camera, a direction in which a centrallocation of the first preview image points to a central location of thesecond preview image is opposite to a sliding direction of the slidingoperation.